Re: pg_amcheck contrib application

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, 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 14:50:54
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> 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.

Actually, it seems like we can let pack/unpack deal with byte-swapping
within 32-bit words; what we lose by not using 'q' format is just the
ability to correctly swap the two 32-bit words. Hence, any value in
which upper and lower halves are the same should work, say

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-03-13 15:20:00 Re: pg_amcheck contrib application
Previous Message Alvaro Herrera 2021-03-13 14:44:00 Re: pgbench - add pseudo-random permutation function