Re: "inconsistent page found" with checksum and wal_consistency_checking enabled
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Ashwin Agrawal <aagrawal@pivotal.io>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-09-20T04:52:15Z
Lists: pgsql-hackers
On Wed, Sep 20, 2017 at 5:23 AM, Ashwin Agrawal <aagrawal@pivotal.io> wrote: > Currently, page checksum is not masked by Page masking routines used by > wal_consistency_checking facility. So, when running `make installcheck` with > data checksum enabled and wal_consistency_checking='all', it easily and > consistently FATALs with "inconsistent page found". Indeed. This had better be fixed before PG10 is out. I am adding an open item. > If anything needs to be masked on Page to perform / pass wal consistency > checking, definitely checksum is not going to match and hence must be masked > as well. Attaching patch to fix the same, installcheck passes with checksums > enabled and wal_consistency_checking='all' with the fix. > > Clubbed to perform the masking with lsn as it sounds logical to have them > together, as lsn is masked is all the cases so far and such is needed for > checksum as well. Agreed. * In consistency checks, the LSN of the two pages compared will likely be - * different because of concurrent operations when the WAL is generated - * and the state of the page when WAL is applied. + * different because of concurrent operations when the WAL is generated and + * the state of the page when WAL is applied. Also, mask out checksum as + * masking anything else on page means checksum is not going to match as well. */ Nit: Using "the LSN and the checksum" instead of the "the LSN". -- Michael
Commits
-
For wal_consistency_checking, mask page checksum as well as page LSN.
- 1a44df007c9b 10.0 landed
- 6a2fa09c0cba 11.0 landed