Re: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.

From: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.
Date: 2011-01-27 10:09:41
Message-ID: AANLkTikhFfAea45a8pai6-P7okFHBm=uRKmyvFgWKjjh@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/1/27 Bruce Momjian <bruce(at)momjian(dot)us>:

> Bruce Momjian wrote:
>
>> Peter Eisentraut wrote:
>>
>>> We use small "k" in postgresql.conf, so pg_test_fsync should use the
>>> same.  Using "kB" would be more accurate in any case.
>>
>> OK, done with the attached applied patch.
>
> FYI, I had used 'k' because this page suggests that k is 1000 and K is
> 1024, at least by the JEDEC memory standards:
>
>        http://en.wikipedia.org/wiki/Kilo

I can't find any reference to that on this page? The following does indeed say:

<URL:http://en.wikipedia.org/wiki/JEDEC_memory_standards>

<quote>
kilo (K): A multiplier equal to 1,024 [..] The specification notes
that these prefixes are included in the document only to reflect
common usage. It refers to the IEEE/ASTM SI 10-1997 standard as
stating, that "this practice frequently leads to confusion and is
deprecated".
</quote>

If you want to make the difference explicit, consider using "KiB"
(1024, note the extra "i") vs. "kB" (1000); although doing so is
probably not consistent with any other uses in PostgreSQL.

<URL:http://en.wikipedia.org/wiki/Kibibyte>

<quote>
The unit symbol for the kibibyte is KiB. The unit was established by
the International Electrotechnical Commission (IEC) in 1999 and has
been accepted for use by all major standards organizations.
</quote>

Nicolas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message JonY 2011-01-27 10:19:37 Re: [Mingw-users] What's the relationship between GCC and MinGW
Previous Message ghatpande 2011-01-27 08:49:18 Re: [HACKERS] Seeking Mentors for Funded Reviewers