Re: pg_amcheck contrib application - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: pg_amcheck contrib application
Date
Msg-id 356632EB-924D-438C-A4AB-97A1CAF6B039@enterprisedb.com
Whole thread Raw
In response to Re: pg_amcheck contrib application  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_amcheck contrib application  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

> On Apr 23, 2021, at 11:29 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> +       expected_size = chunk_seq < last_chunk_seq ? TOAST_MAX_CHUNK_SIZE
> +               : extsize % TOAST_MAX_CHUNK_SIZE;
>
> What's different?

for one thing, if a sequence of chunks happens to fit perfectly, the final chunk will have size TOAST_MAX_CHUNK_SIZE,
butyou're expecting no larger than one less than that, given how modulo arithmetic works. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: pg_amcheck contrib application
Next
From: Justin Pryzby
Date:
Subject: [PATCH] Remove extraneous whitespace in tags: > foo< and >bar <