From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Aleksander Alekseev <aleksander@timescale.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Extending amcheck to check toast size and compression
Date: Wed, 14 Jul 2021 08:38:54 -0700
Message-ID: <00CE66F2-EAAB-4676-AFD2-8D614162F9F1@enterprisedb.com> (raw)
In-Reply-To: <29751EFD-91D8-4F2F-8416-030AD067F260@enterprisedb.com>
References: <C108F673-BF11-41A0-8436-535E998F7A74@enterprisedb.com>
<484213DD-9F6E-440F-885F-0B31C600430F@enterprisedb.com>
<162083278007.16755.9306912342451528285.pgcf@coridan.postgresql.org>
<8729a485-e138-2e18-0d66-74f15ac0c3cc@iki.fi>
<29751EFD-91D8-4F2F-8416-030AD067F260@enterprisedb.com>
> On Jul 14, 2021, at 7:57 AM, Mark Dilger <mark.dilger@enterprisedb.com> wrote:
>
> so no valid toast pointer should contain a va_rawsize field greater than MaxAllocSize
... nor should any valid toast pointer contain a va_extinfo field encoding a va_extsize greater than va_rawsize - VARHDRSZ.
Violations of either of these properties suggest either a bug in the code which wrote the toast pointer, or that the toast pointer has been corrupted since being written, or that the page of data being read is being interpreted incorrectly, perhaps due to catalog corruption, or because the page is just random noise and not part of a valid table, etc. The amcheck code is not focused specifically on whether the toasted value can be detoasted so much as deducing that the data cannot be correct.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: mark.dilger@enterprisedb.com, hlinnaka@iki.fi, aleksander@timescale.com
Subject: Re: Extending amcheck to check toast size and compression
In-Reply-To: <00CE66F2-EAAB-4676-AFD2-8D614162F9F1@enterprisedb.com>
References: <C108F673-BF11-41A0-8436-535E998F7A74@enterprisedb.com> <484213DD-9F6E-440F-885F-0B31C600430F@enterprisedb.com> <162083278007.16755.9306912342451528285.pgcf@coridan.postgresql.org> <8729a485-e138-2e18-0d66-74f15ac0c3cc@iki.fi> <29751EFD-91D8-4F2F-8416-030AD067F260@enterprisedb.com> <00CE66F2-EAAB-4676-AFD2-8D614162F9F1@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox