Re: [PATCH] Cleanup of GUC units code

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Stark <stark(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Marko Kreen <markokr(at)gmail(dot)com>, Asko Oja <ascoja(at)gmail(dot)com>
Subject: Re: [PATCH] Cleanup of GUC units code
Date: 2008-09-10 02:06:31
Message-ID: Pine.GSO.4.64.0809092036550.3033@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-09-10 02:30:41 Re: [PATCH] Cleanup of GUC units code
Previous Message Tom Lane 2008-09-10 01:46:57 Re: Potential Join Performance Issue