Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables

Поиск
Список
Период
Сортировка
От Amul Sul
Тема Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables
Дата
Msg-id CAAJ_b94y98BWWgf0KMw-E_pqM_y8+RogqHtu5nK0kA1uBE3WWw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables  (Oleg Tkachenko <oatkachenko@gmail.com>)
Ответы Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables
Список pgsql-hackers
On Mon, Dec 15, 2025 at 4:39 PM Oleg Tkachenko <oatkachenko@gmail.com> wrote:
>
>  [....]
>
> A patch correcting this logic is attached, and I’m happy to provide additional details or revisions if helpful.
>

Thanks for the reproducer; I can see the reported issue, but I am not
quite sure the proposed fix is correct and might break other cases (I
haven't tried constructed that case yet) but there is a comment
detailing that case just before the point where you are planning to do
the changes:

    /*
     * The truncation block length is the minimum length of the reconstructed
     * file. Any block numbers below this threshold that are not present in
     * the backup need to be fetched from the prior backup. At or above this
     * threshold, blocks should only be included in the result if they are
     * present in the backup. (This may require inserting zero blocks if the
     * blocks included in the backup are non-consecutive.)
     */

IIUC, we might need the original assignment logic as it is. But we
need to ensure that truncation_block_length is not set to a value that
exceeds RELSEG_SIZE.

Regards,
Amul



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