Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Date
Msg-id CA+Tgmobu7N81ViR-XwOdL8C=9njNacYwADPp_KPR6DmqDj7u-g@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Tue, Aug 23, 2016 at 1:43 PM, Bruce Momjian <bruce@momjian.us> wrote:
> On Tue, Aug 23, 2016 at 01:30:29PM -0400, Robert Haas wrote:
>> On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian <bruce@momjian.us> wrote:
>> > and the units were copied when pg_size_pretty() was implemented.  These
>> > units are based on the International System of Units (SI)/metric.
>> > However, the SI system is power-of-10-based, and we just re-purposed
>> > them to be 1024 or 2^10-based.
>> >
>> > However, that is not the end of the story.
>>
>> Sure it is.  The behavior of the code matches the documentation.  The
>> documentation describes one of several reasonable behaviors.  Full
>> stop.
>>
>> > I am thinking Postgres 10 would be a good time to switch to KB as a
>> > 1024-based prefix.  Unfortunately, there is no similar fix for MB, GB,
>> > etc.  'm' is 'milli' so there we never used mB, so in JEDEC and Metric,
>> > MB is ambiguous as 1000-based or 1024-based.
>>
>> I think this would be a backward compatibility break that would
>> probably cause confusion for years.  I think we can add new functions
>> that behave differently, but I oppose revising the behavior of the
>> existing functions ... and I *definitely* oppose adding new
>> behavior-changing GUCs.  The result of that will surely be chaos.
>
> Can you read up through August 1 and then reply?

I have already read the entire thread, and replied only after reading
all messages.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Next
From: Robert Haas
Date:
Subject: Re: Duplicate prototype for socket_set_nonblocking.