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

From Bort, Paul
Subject Re: GUC with units, details
Date
Msg-id DB106B1B5B8F734B8FF3E155A3A556C202D4FD7F@clemail1.tmwsystems.com
Whole thread Raw
In response to Re: GUC with units, details  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: GUC with units, details  (Peter Eisentraut <peter_e@gmx.net>)
Re: GUC with units, details  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
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.

>
> Since about forever, PostgreSQL has used kB, MB, GB to
> describe memory
> allocation.  If we want to change that, we ought to do it across the
> board.  But that's a big board.

The standard hasn't been around forever; some incarnation of PostgreSQL
certainly pre-dates it. But it was created to reduce confusion between
binary and decimal units.

The Linux kernel changed to the standard years ago. And that's just a
few more lines of code than PostgreSQL. ( http://kerneltrap.org/node/340
and others )

Regards,
Paul Bort


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Resurrecting per-page cleaner for btree
Next
From: Peter Eisentraut
Date:
Subject: Re: GUC with units, details