On Thu, Apr 4, 2024 at 2:59 PM shveta malik <shveta.ma...@gmail.com> wrote: > > > Prior to commit 2ec005b, this check was okay, as we did not expect > restart_lsn of the synced slot to be ahead of remote since we were > directly copying the lsns. But now when we use 'advance' to do logical > decoding on standby, there is a possibility that restart lsn of the > synced slot is ahead of remote slot, if there are running txns records > found after reaching consistent-point while consuming WALs from > restart_lsn till confirmed_lsn. In such a case, slot-sync's advance > may end up serializing snapshots and setting restart_lsn to the > serialized snapshot point, ahead of remote one. > > Fix: > The sanity check needs to be corrected. Attached a patch to address the issue.
Please find v2 which has detailed commit-msg and some more comments in code. thanks Shveta
v2-0001-Correct-sanity-check-to-compare-confirmed_lsn.patch
Description: Binary data