Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
Date
Msg-id ZrNNjW/xLbw7IaRs@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state  ("cca5507" <cca5507@qq.com>)
Responses Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
List pgsql-hackers
Hi,

On Mon, Jun 10, 2024 at 10:04:31PM +0800, cca5507 wrote:
> Thank you for reply!I am trying to fix it. This patch (pass check-world) will track txns
> committed in BUILDING_SNAPSHOT state and can fix this bug.

Thanks for the report and the patch!

I did not look at the patch in detail but I can see that it does no contain a test
related to this issue.

Would you mind to add a test in say contrib/test_decoding? (see catalog_change_snapshot
for example).

FWIW, to ease the writing of the test, I think you don't need pub/sub to produce
the issue. I think you can reproduce with a single instance and multiple sessions
: replace in your repro the "(sub)create subscription" by a "logical slot creation"
and finish the test by "pg_logical_slot_get_changes" on the slot created above.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] Add crc32(text) & crc32(bytea)
Next
From: Heikki Linnakangas
Date:
Subject: Call rm_redo in a temporary memory context