Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32ac7a1

Browse files
Exclude VACUUMs from RunningXactData
GetRunningTransactionData() should ignore VACUUM procs because in somecases they are assigned xids. This could lead to holding back xmin viathe route of passing the xid to standby and then having that hold backxmin on master via feedback.Backpatch to 9.1 needed, but will only do so on supported versions.Backpatch once proven on the buildfarm.Reported-by: Greg StarkAuthor: Simon RiggsReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/CANP8+jJBYt=4PpTfiPb0UrH1_iPhzsxKH5Op_Wec634F0ohnAw@mail.gmail.com
1 parent848b1f3 commit32ac7a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/storage/ipc/procarray.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc)
19071907
* GetRunningTransactionData -- returns information about running transactions.
19081908
*
19091909
* Similar to GetSnapshotData but returns more information. We include
1910-
* all PGXACTs with an assigned TransactionId,even VACUUM processes.
1910+
* all PGXACTs with an assigned TransactionId,but not VACUUM processes.
19111911
*
19121912
* We acquire XidGenLock and ProcArrayLock, but the caller is responsible for
19131913
* releasing them. Acquiring XidGenLock ensures that no new XIDs enter the proc
@@ -1995,6 +1995,10 @@ GetRunningTransactionData(void)
19951995
volatilePGXACT*pgxact=&allPgXact[pgprocno];
19961996
TransactionIdxid;
19971997

1998+
/* Ignore procs running LAZY VACUUM */
1999+
if (pgxact->vacuumFlags&PROC_IN_VACUUM)
2000+
continue;
2001+
19982002
/* Fetch xid just once - see GetNewTransactionId */
19992003
xid=pgxact->xid;
20002004

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp