Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wv72D-00035x-2M for pgsql-docs@arkaria.postgresql.org; Thu, 12 Jun 2014 15:35:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wv72C-00051M-Fj for pgsql-docs@arkaria.postgresql.org; Thu, 12 Jun 2014 15:35:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Wv72B-00050K-IK for pgsql-docs@postgresql.org; Thu, 12 Jun 2014 15:35:23 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Wv727-0008LS-8x for pgsql-docs@postgresql.org; Thu, 12 Jun 2014 15:35:22 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Wv724-0000E8-Fu for pgsql-docs@postgresql.org; Thu, 12 Jun 2014 08:35:16 -0700 Date: Thu, 12 Jun 2014 08:35:16 -0700 (PDT) From: David G Johnston To: pgsql-docs@postgresql.org Message-ID: In-Reply-To: <23802.1402584095@sss.pgh.pa.us> References: <53992FF8.2060702@po.ntts.co.jp> <23802.1402584095@sss.pgh.pa.us> Subject: Re: disabling log_rotation_age feature. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_696367_4034410.1402587316488" X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org ------=_Part_696367_4034410.1402587316488 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Jun 12, 2014 at 10:42 AM, Tom Lane-2 [via PostgreSQL] < ml-node+s1045698n5807014h58@n5.nabble.com> wrote: > Fujii Masao <[hidden email] > > writes: > > On Thu, Jun 12, 2014 at 1:43 PM, Tomonari Katsumata > > <[hidden email] > > wrote: > >> The document tells us to set it to ZERO if we want to disable the > feature. > >> However, the feature would be disabled if we set it less than one > minute. > > > That's because log_rotation_age expects the setting value in minutes. > > > This is not a problem only for log_rotation_age. When setting the > parameter > > which expects the value in seconds to less than one second, the setting > value > > is implicitly reset to the default. > > It's not "reset to default", it's set to zero due to rounding the fractio= n > down. Some GUCs interpret zero specially, some don't. > > I wonder if we should round fractions up instead of down in that logic? > It might be less surprising for those GUCs where zero is special, and > it seems like about a wash for most others. > > > =E2=80=8BI think documenting the behavior better, which I would do as part = of the larger patch I'm working on here: [9.3] Should we mention "set_config(...)" in 18.1.3 in Server Configuration= ? http://www.postgresql.org/message-id/CAKFQuwbbOZRqmnx-XRyd+viT+MCAH6TVc0yn1= aJtG5MdSNAWpA@mail.gmail.com would be sufficient. Green field maybe I'd say yes but given that the new behavior could turn features on that are currently off it doesn't seem to be beneficial enough to warrant changing. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/disab= ling-log-rotation-age-feature-tp5806936p5807032.html Sent from the PostgreSQL - docs mailing list archive at Nabble.com. ------=_Part_696367_4034410.1402587316488 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable
On Thu, Jun 12, 2014 = at 10:42 AM, Tom Lane-2 [via PostgreSQL] <[hidden ema= il]> wrote:
=09Fujii Masao <[hidden email]> writes:
> On Thu, Jun 12, 2014 at 1:43 PM, Tomonari Katsumata
> <[hidd= en email]> wrote:
>> The document tells us to set it to ZERO if we want = to disable the feature.
>> However, the feature would be disabled if we set it less than = one minute.

> That's because log_rotation_age expects the setting value = in minutes.

> This is not a problem only for log_rotation_age. When setting = the parameter
> which expects the value in seconds to less than one second, the se= tting value
> is implicitly reset to the default.

It's not "reset to default", it's set to ze= ro due to rounding the fraction
down. =C2=A0Some GUCs interpret zero specially, some don't.

I wonder if we should round fractions up instead of down in that lo= gic?
It might be less surprising for those GUCs where zero is special, and
it seems like about a wash for most others.



=E2=80=8BI think documenting th= e behavior better, which I would do as part of the larger patch I'm wor= king on here:

[9.3] Should we mention "set_config(...)" in 18.1.3 in= Server Configuration?

would be sufficient.

Green field maybe I'd say yes but given that the new behav= ior could turn features on that are currently off it doesn't seem to be= beneficial enough to warrant changing.

David J.


=09 =09 =09

View this message in context: Re: disabl= ing log_rotation_age feature.
Sent from the PostgreSQL - docs mailing list archive at Nabble.c= om.
------=_Part_696367_4034410.1402587316488--