From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Robert Haas <robert(dot)haas(at)enterprisedb(dot)com> |
Subject: | new heapcheck contrib module |
Date: | 2020-04-20 17:59:28 |
Message-ID: | 12ED3DA8-25F0-4B68-937D-D907CFBF08E7@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hackers,
I have been talking with Robert about table corruption that occurs from time to time. The page checksum feature seems sufficient to detect most random corruption problems, but it can't detect "logical" corruption, where the page is valid but inconsistent with the rest of the database cluster. This can happen due to faulty or ill-conceived backup and restore tools, or bad storage, or user error, or bugs in the server itself. (Also, not everyone enables checksums.)
The attached module provides the means to scan a relation and sanity check it. Currently, it checks xmin and xmax values against relfrozenxid and relminmxid, and also validates TOAST pointers. If people like this, it could be expanded to perform additional checks.
There was a prior v1 patch, discussed offlist with Robert, not posted. Here is v2:
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Adding-heapcheck-contrib-module.patch | application/octet-stream | 59.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-04-20 18:01:07 | Re: fixing old_snapshot_threshold's time->xid mapping |
Previous Message | Alvaro Herrera | 2020-04-20 17:55:21 | Re: more ALTER .. DEPENDS ON EXTENSION fixes |