Re: Extending amcheck to check toast size and compression

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extending amcheck to check toast size and compression
Date: 2021-05-04 18:24:35
Message-ID: 484213DD-9F6E-440F-885F-0B31C600430F@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On May 4, 2021, at 9:43 AM, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
> + /* Oversized toasted attributes should never be stored */
> + if (toast_pointer.va_rawsize > VARLENA_SIZE_LIMIT)
> + report_corruption(ctx,
> + psprintf("toast value %u rawsize %u exceeds limit %u",
> + toast_pointer.va_valueid,
> + toast_pointer.va_rawsize,
> + VARLENA_SIZE_LIMIT));
> +
>
> I think the comment sounds wrong since toast is precisely for storage of
> "oversized" attributes.
>
> https://www.postgresql.org/docs/current/storage-toast.html
> | This section provides an overview of TOAST (The Oversized-Attribute Storage Technique).

Thanks for reviewing! Changed to:

+ /* Toasted attributes too large to be untoasted should never be stored */

Attachment Content-Type Size
v2-0001-Adding-more-toast-pointer-checks-to-amcheck.patch application/octet-stream 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-05-04 18:26:39 Re: PG in container w/ pid namespace is init, process exits cause restart
Previous Message Joe Conway 2021-05-04 18:07:06 Re: PG in container w/ pid namespace is init, process exits cause restart