Content-Length: 265688 | pFad | http://github.com/postgrespro/postgres_cluster/commit/1129c2b0ad2732f301f696ae2cf98fb063a4c1f8

45 Correct comment in GetConflictingVirtualXIDs() · postgrespro/postgres_cluster@1129c2b · GitHub
Skip to content

Commit 1129c2b

Browse files
Correct comment in GetConflictingVirtualXIDs()
We use Share lock because it is safe to do so.
1 parent 0034757 commit 1129c2b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/storage/ipc/procarray.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,8 +2540,11 @@ GetConflictingVirtualXIDs(TransactionId limitXmin, Oid dbOid)
25402540

25412541
/*
25422542
* We ignore an invalid pxmin because this means that backend has
2543-
* no snapshot and cannot get another one while we hold exclusive
2544-
* lock.
2543+
* no snapshot currently. We hold a Share lock to avoid contention
2544+
* with users taking snapshots. That is not a problem because
2545+
* the current xmin is always at least one higher than the latest
2546+
* removed xid, so any new snapshot would never conflict with the
2547+
* test here.
25452548
*/
25462549
if (!TransactionIdIsValid(limitXmin) ||
25472550
(TransactionIdIsValid(pxmin) && !TransactionIdFollows(pxmin, limitXmin)))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/1129c2b0ad2732f301f696ae2cf98fb063a4c1f8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy