Insights into duplicate records seen in snapshot & logical replication slot. - Mailing list pgsql-hackers

From Chandy G
Subject Insights into duplicate records seen in snapshot & logical replication slot.
Date
Msg-id 1946402070.121016.1752131919475@mail.yahoo.com
Whole thread Raw
List pgsql-hackers
Hi,
  I am using postgres version 15.5 along with debezium to do CDC using logical replication slot after the initial snapshot of the db is complete.  Recently, observed a few cases where a record in a table showed up both via snapshot as well as from the replication slot. (this was a insert dml).

The understanding is that any dmls in a transaction has to either fall into the snapshot phase (as its a consistent snapshot done using the id returned during the replication slot along with repeatable read) or into the streaming phase , as read from the replication slot.

This issue is also not reproducible consistently, looks like a race condition. Am i stumbling upon a bug?

TIA

pgsql-hackers by date:

Previous
From: sunil s
Date:
Subject: Re: Unnecessary delay in streaming replication due to replay lag
Next
From: Daniel Gustafsson
Date:
Subject: Re: Adding support for SSLKEYLOGFILE in the frontend