From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Stephen Frost <sfrost(at)snowman(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Amul Sul <sulamul(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_amcheck contrib application |
Date: | 2021-03-13 13:49:50 |
Message-ID: | CA+Tgmoakmgv7Pd0sHJedzWB=j-+htESZrei2PaEnLJ8mhqSZXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 13, 2021 at 1:55 AM Mark Dilger
<mark(dot)dilger(at)enterprisedb(dot)com> wrote:
> I thought about that, but I'm not sure that it proves much more than just using zero. The test doesn't really do much of interest with this value, and it doesn't seem worth complicating the test. The idea originally was that perl's "q" pack code would make reading/writing a number such as 12345678 easy, but since it's not easy, this is easy.
I think it would be good to use a non-zero value here. We're doing a
lot of poking into raw bytes here, and if something goes wrong, a zero
value is more likely to look like something normal than whatever else.
I suggest picking a value where all 8 bytes are the same, but not
zero, and ideally chosen so that they don't look much like any of the
surrounding bytes.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2021-03-13 14:44:00 | Re: pgbench - add pseudo-random permutation function |
Previous Message | Magnus Hagander | 2021-03-13 11:53:30 | Re: shared-memory based stats collector |