public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bharath Rupireddy <[email protected]>
To: Michael Paquier <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Fix race leading to incorrect conflict cause in InvalidatePossib
Date: Thu, 11 Apr 2024 12:38:06 +0530
Message-ID: <CALj2ACVPSB74mrDTFezz-LV3Oi6F3SN71QA0oUHvndzi5dwTNg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Tue, Feb 20, 2024 at 10:14 AM Michael Paquier <[email protected]> wrote:
>
> Fix race leading to incorrect conflict cause in InvalidatePossiblyObsoleteSlot()
I found a typo with the code added by this commit - we've used
XLogRecPtr/InvalidXLogRecPtr for xmins in place of
TransactionId/InvalidTransactionId. Attached a patch to fix this.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachments:
[application/octet-stream] v1-0001-Use-correct-datatype-for-xmin-variables-added-by-.patch (1.1K, 2-v1-0001-Use-correct-datatype-for-xmin-variables-added-by-.patch)
download | inline diff:
From 73f85cc634d85e82dc6cd38945c492fb0389fe94 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <[email protected]>
Date: Thu, 11 Apr 2024 07:04:28 +0000
Subject: [PATCH v1] Use correct datatype for xmin variables added by 818fefd8
---
src/backend/replication/slot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 3bddaae022..cebf44bb0f 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -1545,8 +1545,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 invalidation_cause_prev PG_USED_FOR_ASSERTS_ONLY = RS_INVAL_NONE;
--
2.34.1
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pgsql: Fix race leading to incorrect conflict cause in InvalidatePossib
In-Reply-To: <CALj2ACVPSB74mrDTFezz-LV3Oi6F3SN71QA0oUHvndzi5dwTNg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox