Re: Extending amcheck to check toast size and compression

Mark Dilger <mark.dilger@enterprisedb.com>

From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Stark <stark@mit.edu>, Heikki Linnakangas <hlinnaka@iki.fi>, Aleksander Alekseev <aleksander@timescale.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-04T22:58:16Z
Lists: pgsql-hackers

Attachments


> On Nov 4, 2021, at 7:53 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> 
> But, is it plausible to add test coverage for the new checks, or is
> that going to be too much of a pain?

It only takes about 20 additional lines in the regression test to check the code paths for raw sizes which are too large and too small, so I've done that in this next version.  Testing corrupt compressed data in a deterministic, cross platform manner with a compact, easy to maintain regression test has eluded me and is not included here.

Commits

  1. Remove tests added by bd807be6935929bdefe74d1258ca08048f0aafa3.

  2. amcheck: Add additional TOAST pointer checks.