summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-07-04 02:05:27 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2024-07-04 02:08:01 +0300
commit619f76cce11dc51458eb4ea81b0e48d15d0b2d07 (patch)
tree271e1d78d3653d48b71c3829d00f61c37d205599
parent95219c020c3c8c59079f264386141065865a810e (diff)
Fix typo in GetRunningTransactionData()
e85662df44 made GetRunningTransactionData() calculate the oldest running transaction id within the current database. However, because of the typo, the new code uses oldestRunningXid instead of oldestDatabaseRunningXid in comparison before updating oldestDatabaseRunningXid. This commit fixes that issue. Reported-by: Noah Misch Discussion: https://postgr.es/m/20240630231816.bf.nmisch%40google.com Backpatch-through: 17
-rw-r--r--src/backend/storage/ipc/procarray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 387b4a405b0..9fc930e98f8 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -2779,7 +2779,7 @@ GetRunningTransactionData(void)
* Also, update the oldest running xid within the current database.
*/
if (proc->databaseId == MyDatabaseId &&
- TransactionIdPrecedes(xid, oldestRunningXid))
+ TransactionIdPrecedes(xid, oldestDatabaseRunningXid))
oldestDatabaseRunningXid = xid;
if (ProcGlobal->subxidStates[index].overflowed)