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

From Joshua D. Drake
Subject Re: units in postgresql.conf comments
Date
Msg-id 51A70540.1030205@commandprompt.com
Whole thread Raw
In response to Re: units in postgresql.conf comments  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: units in postgresql.conf comments
Re: units in postgresql.conf comments
List pgsql-hackers
On 05/30/2013 12:01 AM, Heikki Linnakangas wrote:

> We could make it mandatory to specify the unit in the value. Ie. throw
> an error on "wal_sender_timeout = 50":
>
> ERROR: unit required for option "wal_sender_timeout"
> HINT:  Valid units for this parameter are "ms", "s", "min", "h", and "d".
>
> Then you wouldn't need a comment to explain what the unit of a naked
> value is. The only problem I see with that is backwards-compatibility.
> Old postgresql.conf files containing naked values would no longer work.
> But all you'd need to do is to add in the units, which would work on
> older versions too, and would be good for readability anyway.

I like this idea with one addition. We should have a default unit for 
each. For wal_sender_timeout seconds makes sense, but for 
checkpoint_timeout minutes makes sense (for example).

JD



>
> - Heikki
>
>




pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [PATCH] add --throttle to pgbench (submission 3)
Next
From: Craig Ringer
Date:
Subject: Re: [PATCH] add --throttle to pgbench (submission 3)