From: | Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Berger <Thomas(dot)Berger(at)1und1(dot)de> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() |
Date: | 2016-09-14 22:03:13 |
Message-ID: | b19d5d4c-5b87-d1c2-2225-7234e413c5eb@archidevsys.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On 15/09/16 03:45, Robert Haas wrote:
> On Wed, Sep 14, 2016 at 5:22 AM, Thomas Berger <Thomas(dot)Berger(at)1und1(dot)de> wrote:
>> Today, i found the time to read all the mails in this thread, and i think i have to explain, why we decided to open a bug for this behavior.
>>
>> Pn Tuesday, 23. August 2016, 13:30:29 Robert Haas wrote:
>>> J. Random User: I'm having a problem!
>>> Mailing List: Gee, how big are your tables?
>>> J. Random User: Here's some pg_size_pretty output.
>>> Mailing List: Gosh, we don't know what that means, what do you have
>>> this obscure GUC set to?
>>> J. Random User: Maybe I'll just give up on SQL and use MongoDB.
>> In fact, we had just the other way around. One of our most critical databases had some extreme bloat.
>> Some of our internal customers was very confused, about the sizes reported by the database.
>> This confusion has led to wrong decisions. (And a long discussion about the choice of DBMS btw)
>>
>> I think there is a point missing in this whole discussion, or i just didn't see it:
>>
>> Yeah, the behavior of "kB" is defined in the "postgresql.conf" documentation.
>> But no _user_ reads this. There is no link or hint in the documentation of "pg_size_pretty()" [1].
> Interesting. I think that our documentation should only describe the
> way we use unit suffixes in one central place, but other places (like
> pg_size_pretty) could link to that central place.
>
> I don't believe that there is any general unanimity among users or
> developers about the question of which suffixes devote units
> denominated in units of 2^10 bytes vs. 10^3 bytes. About once a year,
> somebody makes an argument that we're doing it wrong, but the evidence
> that I've seen is very mixed. So when people say that there is only
> one right way to do this and we are not in compliance with that one
> right way, I guess I just don't believe it. Not everybody likes the
> way we do it, but I am fairly sure that if we change it, we'll make
> some currently-unhappy people happy and some currently-happy people
> unhappy. And the people who don't care but wanted to preserve
> backward compatibility will all be in the latter camp.
>
> However, that is not to say that the documentation couldn't be better.
>
Well, I started programming 1968, and was taught that 1 kilobyte was
1024 (2^10).
I object to Johny-come-latelies who try and insist it is 1000.
As regards 'kB' vs 'KB', I'm not too worried either way - I think
consistency is more important
Cheers,
Gavin
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2016-09-15 00:19:32 | Re: BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start |
Previous Message | Tom Lane | 2016-09-14 15:54:45 | Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2016-09-14 22:34:44 | Re: Hash Indexes |
Previous Message | Robert Haas | 2016-09-14 21:54:07 | Re: Choosing parallel_degree |