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

From: Amul Sul <sulamul(at)gmail(dot)com>
To: Oleg Tkachenko <oatkachenko(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Stanislav Bashkyrtsev <stanislav(dot)bashkyrtsev(at)elsci(dot)io>
Subject: Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables
Date: 2025-12-18 06:05:11
Message-ID: CAAJ_b95v6Kbby_YkBbvAgdujEM7uD7YCTCa62upSZjexsZ8qgw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 17, 2025 at 3:25 AM Oleg Tkachenko <oatkachenko(at)gmail(dot)com> wrote:
>
> Hello, Robert
>
> I’ve created a small test that reproduces the issue. With the proposed fix applied, the test passes, and the reconstruction behaves as expected.
>
> I’m attaching the test for review. Please let me know if this looks OK or if you would like it changed.
>

Test looks good to me, but I have three suggestions as follow:

1. To minimize repetition in insert: use fillfactor 10, which is the
minimal we can set for a table, so that we can minimize tuples per
page. Use a longer string and lower count in repeat(), which I believe
helps the test become a bit faster.

2. I think we could add this test to the existing pg_combinebackup's
test file instead of creating a new file with a single-test. See the
attached version; it’s a bit smaller than your original patch, but
since I haven't copied all of your comments yet, I’ve marked it as
WIP.

3. Kindly combine the code fix and tests together into a single patch.

Regards,
Amul

Attachment Content-Type Size
WIP-add-tests-to-pg_combinebackup.patch application/octet-stream 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2025-12-18 06:29:00 Fix outdated comments in catcache.h
Previous Message shveta malik 2025-12-18 06:00:30 Re: Skipping schema changes in publication