Skip to content

Commit 6c1af54

Browse files
committed
Fix typo in GetRunningTransactionData()
e85662d 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
1 parent 4331a11 commit 6c1af54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/storage/ipc/procarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2779,7 +2779,7 @@ GetRunningTransactionData(void)
27792779
* Also, update the oldest running xid within the current database.
27802780
*/
27812781
if (proc->databaseId == MyDatabaseId &&
2782-
TransactionIdPrecedes(xid, oldestRunningXid))
2782+
TransactionIdPrecedes(xid, oldestDatabaseRunningXid))
27832783
oldestDatabaseRunningXid = xid;
27842784

27852785
if (ProcGlobal->subxidStates[index].overflowed)

0 commit comments

Comments
 (0)