Re: WAL consistency check facility - Mailing list pgsql-hackers

From Kuntal Ghosh
Subject Re: WAL consistency check facility
Date
Msg-id CAGz5QC+RAqf8axtBAV7CuEksqjqWK_3gmk=G7RiUTUz67tjvBw@mail.gmail.com
Whole thread Raw
In response to Re: WAL consistency check facility  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: WAL consistency check facility  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Hello,

I've added the updated the patch with the necessary documentation and comments.
I've referenced Robert's reply in this thread and Simon's reply in
Production block comparison facility thread to write the documentation.

This feature is used to check the consistency of WAL records, i.e,
whether the WAL records are inserted and applied correctly.
A guc parameter named wal_consistency is added to enable this feature.
When wal_consistency is enabled for a WAL record, it stores a full-page image
along with the record. When a full-page image arrives during redo, it compares
against the current page to check whether both are consistent.

The default value for this setting is none. To check all records written to the
write-ahead log, set this parameter to all. To check only some records, specify
a comma-separated list of resource managers. The resource managers which
are currently supported are xlog, heap2, heap, btree, hash, gin, gist, spgist,
sequence, brin and generic.

If any inconsistency is detected, it throws a WARNING. But, as per discussions
in the earlier threads, it can be changed to ERROR./FATAL(just a one
word change).
I've kept this as warning because of some inconsistency in BRIN VACUUM
during gmake check.

In recovery tests, I've enabled this feature in PostgresNode.pm.

Thanks to Amit, Dilip, Michael, Simon and Robert for their valuable feedbacks.

Thoughts?

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Masahiko Sawada
Date:
Subject: Re: Block level parallel vacuum WIP