Skip site navigation (1) Skip section navigation (2)

Re: GUC with units, details

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "Bort, Paul" <pbort(at)tmwsystems(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <neilc(at)samurai(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GUC with units, details
Date: 2006-07-26 21:10:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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(at)svana(dot)org>
> From each according to his ability. To each according to his ability to litigate.

In response to


pgsql-hackers by date

Next:From: Hannu KrosingDate: 2006-07-26 21:16:33
Subject: Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to
Previous:From: Sailesh KrishnamurthyDate: 2006-07-26 21:08:20
Subject: Update on TelegraphCQ

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group