Re: [PATCH] Cleanup of GUC units code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
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 00:28:48
Message-ID: 11001.1221006528@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> What I would like to see (but don't
> have nearly enough time to argue in support of considering the resistance
> to change here) is that this syntax:

> shared_buffers=1024

> Would assume the user meant 1024 *bytes*, with the server silently
> rounding that up to the nearest 8k block. Then the whole issue of "do
> they mean bits or bytes?" goes away, because no one would ever have to
> include the "B".

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

There's also a pretty serious compatibility problem, which is that
settings that had always worked before would suddenly be completely
broken (off by a factor of 8192 qualifies as "broken" in my book).

I think that if we wanted to change anything here, we'd have to
*require* a unit spec on unit-affected parameters, at least for a period
of several releases. Otherwise the confusion would be horrendous.

> That paves the way for making it easy to support
> case-insensitive values without pedantic confusion.

Again, you're just making this up. It doesn't make anything clearer.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2008-09-10 01:23:03 Re: hash index improving v3
Previous Message Gregory Williamson 2008-09-10 00:25:07 Re: Keeping creation time of objects