Re: [PATCH] Cleanup of GUC units code - Mailing list pgsql-hackers

From Greg Smith
Subject Re: [PATCH] Cleanup of GUC units code
Date
Msg-id Pine.GSO.4.64.0809092036550.3033@westnet.com
Whole thread Raw
In response to Re: [PATCH] Cleanup of GUC units code  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 9 Sep 2008, Tom Lane wrote:

> How do you come to that conclusion?  Leaving off the unit entirely
> certainly doesn't make the user's intent clearer.

Same way I do all my conclusions in this area--talking to people in the 
field regularly who've never configured a postgresql.conf before.  I 
highly recommend it for a fresh view.

Here's how this works every time I go throught it.  When you first 
encounter someone who is new to PostgreSQL, after they find out 
"shared_buffers" is a memory allocation they presume it's in bytes until 
they find out otherwise.  And then they're slightly annoyed that a) if 
they accidentally don't include a unit all the values get way bigger 
because of some backward compatibility nonsense they don't care about and 
b) that it's case sensitive.  Since some of the arguments against (b) ("Mb 
could mean megabits!") diminish if the recommended practice is to just 
keep the multiplier in there, so the byte part of the unit is optional and 
not used by the default postgresql.conf, that seems the most reasonable 
way to proceed to me.

Unlike things like network speed where it's more complicated, memory is 
measured in bytes unless there's a different multiplier attached by most 
people.  Greg Stark already made this same observation yesterday:  "But 
the point is that yes, people expect to type "100M" or "1G" and have that 
work. Plenty of us do it all the time with dd or other tools already."

I don't actually expect any adjustment here but was getting a little bored 
watching everyone replay 
http://archives.postgresql.org/pgsql-hackers/2006-07/msg01229.php with 
barely any changes from the first time.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Potential Join Performance Issue
Next
From: "Robert Haas"
Date:
Subject: Re: [PATCH] Cleanup of GUC units code