From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix GetStrictOldestNonRemovableTransactionId() on standby
Date: Thu, 15 Aug 2024 21:19:07 +0000
Message-ID: <E1sehsB-004Kuu-6f@gemulon.postgresql.org> (raw)
Fix GetStrictOldestNonRemovableTransactionId() on standby
e85662df44 implemented GetStrictOldestNonRemovableTransactionId() function
for computation of xid horizon that avoid reporting of false errors.
However, GetStrictOldestNonRemovableTransactionId() uses
GetRunningTransactionData() even on standby leading to an assertion failure.
Given that we decided to ignore KnownAssignedXids and standby can't have
own running xids, we switch to use TransamVariables->nextXid as a xid horizon.
Also, revise the comment regarding ignoring KnownAssignedXids with more
detailed reasoning provided by Heikki.
Reported-by: Heikki Linnakangas
Discussion: https://postgr.es/m/42218c4f-2c8d-40a3-8743-4d34dd0e4cce%40iki.fi
Reviewed-by: Heikki Linnakangas
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e2ed7e32271a82179c3f8c7c93ce52ff93c6dd3c
Modified Files
--------------
contrib/pg_visibility/pg_visibility.c | 26 +++++++++++++++++++---
.../pg_visibility/t/001_concurrent_transaction.pl | 19 ++++++++++++++--
2 files changed, 40 insertions(+), 5 deletions(-)
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: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix GetStrictOldestNonRemovableTransactionId() on standby
In-Reply-To: <E1sehsB-004Kuu-6f@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox