Re: units in postgresql.conf comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: units in postgresql.conf comments
Date
Msg-id 24779.1389468456@sss.pgh.pa.us
Whole thread Raw
In response to Re: units in postgresql.conf comments  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote:
>> I think these sort of entries don't make much sense:
>> 
>> #wal_sender_timeout = 60s      # in milliseconds; 0 disables
>> 
>> I think we should remove units from the comments when it's clear from
>> the name or the default value that time units are accepted.

> So, is anyone doing this?  Should it be a TODO item?

I think Peter's wrong here, for two reasons:

* The comment tells you what undecorated "wal_sender_timeout = 60" will
do.

* The comment tells you what the precision of the setting is.  For
instance, archive_timeout is in seconds; you can try setting it to "10ms"
if you like, but that won't do much for you.

We could imagine making these points moot, by disallowing inputs that lack
units and converting all time GUCs into some common scale (requiring
wider-than-int storage) ... but that seems sufficiently non backward
compatible that I don't see it happening.  It's not clear that it'd be a
usability improvement anyway.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Recovery to backup point
Next
From: Peter Eisentraut
Date:
Subject: Re: nested hstore patch