Re: pg_verify_checksums failure with hash indexes - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pg_verify_checksums failure with hash indexes
Date
Msg-id CAA4eK1J_49Q2vU7A5fRuqZTNcSozE57fS3dfdxDprcafsR=RqA@mail.gmail.com
Whole thread Raw
In response to pg_verify_checksums failure with hash indexes  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: pg_verify_checksums failure with hash indexes
List pgsql-hackers
On Tue, Aug 28, 2018 at 2:51 PM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
>
> This is reproducible with PG11 and PG12:
>
> initdb -k data
> postgres -D data
>
> make installcheck
> # shut down postgres with Ctrl-C
>
..
>
> The files in question correspond to
>
> hash_i4_index
> hash_name_index
> hash_txt_index
>

I have looked into this problem and found the cause of it.  This
problem is happening for the empty page in the hash index.  On a
split, we allocate a new splitpoint's worth of bucket pages wherein we
initialize the last page with zero's, this is all fine, but we forgot
to set the checksum for that last page.  Attached patch fixes the
problem for me.

Can someone try and share their findings?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Reopen logfile on SIGHUP
Next
From: Yugo Nagata
Date:
Subject: Re: pg_verify_checksums failure with hash indexes