Re: pg_amcheck contrib application

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_amcheck contrib application
Дата
Msg-id CA+TgmoapGYVYzb9nctO9+znsSafcsHBAf6bb2x_px8pT4aZe=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_amcheck contrib application  (Mark Dilger <mark.dilger@enterprisedb.com>)
Ответы Re: pg_amcheck contrib application
Список pgsql-hackers
On Fri, Apr 23, 2021 at 2:36 PM Mark Dilger
<mark.dilger@enterprisedb.com> wrote:
> > 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.
 

Good point.

Perhaps something like this, closer to the way you had it?

       expected_size = chunk_seq < last_chunk_seq ? TOAST_MAX_CHUNK_SIZE
               : extsize - (last_chunk_seq * TOAST_MAX_CHUNK_SIZE);

-- 
Robert Haas
EDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: decoupling table and index vacuum
Следующее
От: Andres Freund
Дата:
Сообщение: Testing autovacuum wraparound (including failsafe)