1/2 Hey , we’ve observed on 13.3 snapshot recovery conflict on standby despite hot_standby_feedback = on. That’s on "Btree/REUSE_PAGE” where the btpo xact is soo old leading to the diff in TransactionIdFollows() being >= 2^31 +1 so “wrongly” returning false.
Conversation
2/2 It looks like e5d8a999030418a1b9e53d5f15ccaca7ed674877 is fixing this as using ResolveRecoveryConflictWithSnapshotFullXid() in btree_xlog_reuse_page(). Do you agree?
1
2
Wish it could have been backported... but that's a really big non-trivial diff and likely an uncommon problem, I can see why it could be pg14 only
1
right! Did not look at the details yet but i'm wondering if the whole patch needs to be back-ported to fix this particular issue (means if the PG 14 patch fixes multiples issues and only a "subset" could be back-ported for this particular issue).
1
Is the concern just that the page cannot be reused indefinitely? Or something else as well?
1
The concern is that there is « false » snapshot recovery conflict if the diff between the backend xid on the standby and the btpo xact is > 2^31 + 1 . This is due to the (int32) casting in TransactionIdFollows().
3
I see - backend state could (usually) prove that supposed XID from the future actually has to be wrapped around and from the past, but we don't check. We've known about the general issue forever, but not this symptom. Perhaps you should report this to bugs list.
Thanks! Will do and will try to report the bug with a POC patch at the same time.
1

