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

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.
Date: 2011-01-26 21:10:40
Message-ID: 1296076240.14137.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

We use small "k" in postgresql.conf, so pg_test_fsync should use the
same. Using "kB" would be more accurate in any case.


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.
Date: 2011-01-26 21:21:31
Message-ID: 201101262121.p0QLLVt06521@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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.

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

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/fsync.diff text/x-diff 2.3 KB

From: Bruce Momjian <bruce(at)momjian(dot)us>
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 00:06:41
Message-ID: 201101270006.p0R06fF24588@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

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

+ It's impossible for everything to be true. +


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
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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
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 15:53:23
Message-ID: 201101271553.p0RFrN407756@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Nicolas Barbier wrote:
> 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:

Sorry, I posed the wrong URL; it should have been:

http://en.wikipedia.org/wiki/Bytes#Unit_symbol

You can see the chart on the right. However, I agree 'kB' is the best.

---------------------------------------------------------------------------

> <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

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

+ It's impossible for everything to be true. +


From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Nicolas Barbier" <nicolas(dot)barbier(at)gmail(dot)com>, "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 16:22:12
Message-ID: 4D4147540200002500039E98@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> http://en.wikipedia.org/wiki/Bytes#Unit_symbol
>
> You can see the chart on the right.

According to which, the JEDEC standard requires KB and the IEC
standard requires KiB. What standard led us to use kB instead? It
seems to generally mean 1000 instead of 1024.

> However, I agree 'kB' is the best.

Why?

-Kevin


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, 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 16:33:55
Message-ID: 201101271633.p0RGXtH11225@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Kevin Grittner wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> > http://en.wikipedia.org/wiki/Bytes#Unit_symbol
> >
> > You can see the chart on the right.
>
> According to which, the JEDEC standard requires KB and the IEC
> standard requires KiB. What standard led us to use kB instead? It
> seems to generally mean 1000 instead of 1024.

I assume Peter did lots of research when he added 'kB' to
postgresql.conf.

> > However, I agree 'kB' is the best.
>
> Why?

No idea.

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

+ It's impossible for everything to be true. +


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>
Cc: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <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 21:24:18
Message-ID: 1296163356-sup-3006@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Excerpts from Kevin Grittner's message of jue ene 27 13:22:12 -0300 2011:
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> > http://en.wikipedia.org/wiki/Bytes#Unit_symbol
> >
> > You can see the chart on the right.
>
> According to which, the JEDEC standard requires KB and the IEC
> standard requires KiB. What standard led us to use kB instead? It
> seems to generally mean 1000 instead of 1024.

http://en.wikipedia.org/wiki/International_System_of_Units#Writing_unit_symbols_and_the_values_of_quantities

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Nicolas Barbier" <nicolas(dot)barbier(at)gmail(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "pgsql-hackers" <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 21:37:47
Message-ID: 4D41914B0200002500039EE2@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Kevin Grittner's message of jue ene 27 13:22:12
-0300 2011:
>> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>
>> > http://en.wikipedia.org/wiki/Bytes#Unit_symbol
>> >
>> > You can see the chart on the right.
>>
>> According to which, the JEDEC standard requires KB and the IEC
>> standard requires KiB. What standard led us to use kB instead?
>> It seems to generally mean 1000 instead of 1024.
>
>
http://en.wikipedia.org/wiki/International_System_of_Units#Writing_unit_symbols_and_the_values_of_quantities

That seems to agree with the other page that k means 10^3, not 2^10
-- or am I missing something? We are treating it as 2^10 in our
GUCs, aren't we?

-Kevin