Re: GUC with units, details

From: "Bort, Paul" <pbort(at)tmwsystems(dot)com>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Neil Conway" <neilc(at)samurai(dot)com>
Cc: "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 16:17:00
Message-ID: DB106B1B5B8F734B8FF3E155A3A556C202D4FD7F@clemail1.tmwsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-07-26 16:36:51 Re: GUC with units, details
Previous Message Tom Lane 2006-07-26 16:09:04 Re: [HACKERS] Resurrecting per-page cleaner for btree