From: Michael Paquier Date: Thu, 11 Apr 2024 08:19:35 +0000 (+0900) Subject: Use correct datatype for xmin variables in slot.c X-Git-Tag: REL_16_3~40 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=574c7c754666a2b5634efd700d3602629d261362;p=postgresql.git Use correct datatype for xmin variables in slot.c Two variables storing a slot's effective_xmin and effective_catalog_xmin were saved as XLogRecPtr, which is incorrect as these should be TransactionIds. Oversight in 818fefd8fd44. Author: Bharath Rupireddy Discussion: https://postgr.es/m/CALj2ACVPSB74mrDTFezz-LV3Oi6F3SN71QA0oUHvndzi5dwTNg@mail.gmail.com Backpatch-through: 16 --- diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index e70f066eb88..1f9d0ed9b3e 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -1322,8 +1322,8 @@ InvalidatePossiblyObsoleteSlot(ReplicationSlotInvalidationCause cause, int last_signaled_pid = 0; bool released_lock = false; bool terminated = false; - XLogRecPtr initial_effective_xmin = InvalidXLogRecPtr; - XLogRecPtr initial_catalog_effective_xmin = InvalidXLogRecPtr; + TransactionId initial_effective_xmin = InvalidTransactionId; + TransactionId initial_catalog_effective_xmin = InvalidTransactionId; XLogRecPtr initial_restart_lsn = InvalidXLogRecPtr; ReplicationSlotInvalidationCause conflict_prev PG_USED_FOR_ASSERTS_ONLY = RS_INVAL_NONE;