Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: thomas(dot)berger(at)1und1(dot)de, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Date: 2016-08-23 17:43:07
Message-ID: 20160823174307.GB3895@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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(at)momjian(dot)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?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2016-08-23 17:45:44 Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Previous Message Robert Haas 2016-08-23 17:30:29 Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-08-23 17:45:44 Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Previous Message Robert Haas 2016-08-23 17:30:29 Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()