Re: GUC with units, details - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: GUC with units, details
Date
Msg-id 20060726211039.GE32377@svana.org
Whole thread Raw
In response to Re: GUC with units, details  ("Bort, Paul" <pbort@tmwsystems.com>)
Responses Re: GUC with units, details  ("Bort, Paul" <pbort@tmwsystems.com>)
Re: GUC with units, details  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-hackers
On Wed, Jul 26, 2006 at 12:17:00PM -0400, Bort, Paul wrote:
> Peter Eisentraut wrote:
>
> > I'd imagine that one of the first things someone will want to try is
> > something like SET work_mem TO '10MB', which will fail or misbehave
> > because 10000000 bytes do not divide up into chunks of 1024
> > bytes.  Who
> > wants to explain to users that they have to write '10MiB'?
>
> How about this:
>
> INFO: Your setting was converted to IEC standard binary units. Use KiB,
> MiB, and GiB to avoid this warning.

That's silly. If you're going to treat KB as 1024 bytes anyway,
complaining about it is just being pedantic.

The thing is, most memory sizes in postgres need to be some multiple of
a page size. You can't have a shared buffers of exactly 100000 bytes,
while 102400 bytes is possible. When someone has a GB of memory, they
really mean a GiB, but no-one bothers to correct them.

Is there anywhere in postgres where using K=1000 would be significantly
clearer than K=1024?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to user level
Next
From: "Sailesh Krishnamurthy"
Date:
Subject: Update on TelegraphCQ