summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
authorAlexander Korotkov2024-07-03 23:05:27 +0000
committerAlexander Korotkov2024-07-03 23:05:27 +0000
commit6c1af5482e6943a5f29b7f4ca773c720ec8202b0 (patch)
tree8c6b305bb25bcfc2734d8e505bf96097502d4af5 /src/backend/storage/ipc
parent4331a11c62eca7426ad4472be051fe512a04fc80 (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
Diffstat (limited to 'src/backend/storage/ipc')
-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)