Re: [PATCH] Cleanup of GUC units code

From: "Asko Oja" <ascoja(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Marko Kreen" <markokr(at)gmail(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Cleanup of GUC units code
Date: 2008-09-03 08:58:18
Message-ID: ecd779860809030158l7d0c8e2bl84136d78badbe1f4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 3, 2008 at 11:20 AM, Heikki Linnakangas <
heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> Marko Kreen wrote:
>
>> On 9/2/08, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>
>>> Marko Kreen wrote:
>>>
>>>> In the meantime, here is simple patch for case-insensivity.
>>>>
>>> You might be able to talk me into accepting various unambiguous, common
>>> alternative spellings of various units. But for instance allowing MB and
>>> Mb
>>> to mean the same thing is insane.
>>>
>>
>> How would the docs for that look like? And anyway, what is wrong with
>> Mb for megabytes?
>
> From infamous wikipedia: A *megabit* is a unit of information<http://en.wikipedia.org/wiki/Information>or computer storage, abbreviated
*Mbit* (or *Mb*).
To me playing with case of acronyms and even depending on it seems more
insane. It would make much more sense to have case insensitive set of
acronyms and (thanks Tom for pointing out) some sanity checks when
configuration is loaded to notify user when wrong ones are used for some
context.

>
> I doesn't seem completely unreasonable to me that we'd want to express
> something in megabits/second in the future. For example, instead of
> vacuum_cost_delay, it would be cool to specify a bandwidth allowance.
> Megabits/second is a completely reasonable unit for that. Or a limit on
> network bandwidth.
>
There are less confusing (better) acronyms kbit/s and mbit/s available for
that.

>
> FWIW, I don't feel very strongly either way. I'm more than happy with the
> status quo. The hint in the error message very clearly spells out what the
> valid values are, so it's immediately clear what you need to fix if you get
> that wrong.

Is the database down during that time?

>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2008-09-03 09:18:33 Re: [PATCH] Cleanup of GUC units code
Previous Message Asko Oja 2008-09-03 08:27:55 Re: IN vs EXISTS equivalence