aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/varsup.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-05-19 21:35:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-05-19 21:35:48 +0000
commitee3b71f6bce929b07636f76d1654832cb6b5a489 (patch)
treece95108d3c0e832555b78e96afb173458991b19e /src/backend/access/transam/varsup.c
parent6910032a56dd3841be137b4bef7c57ef32a60ac8 (diff)
downloadpostgresql-ee3b71f6bce929b07636f76d1654832cb6b5a489.tar.gz
postgresql-ee3b71f6bce929b07636f76d1654832cb6b5a489.zip
Split the shared-memory array of PGPROC pointers out of the sinval
communication structure, and make it its own module with its own lock. This should reduce contention at least a little, and it definitely makes the code seem cleaner. Per my recent proposal.
Diffstat (limited to 'src/backend/access/transam/varsup.c')
-rw-r--r--src/backend/access/transam/varsup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index cb532d8df34..5c51e69253e 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -6,7 +6,7 @@
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/varsup.c,v 1.63 2005/04/13 18:54:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/varsup.c,v 1.64 2005/05/19 21:35:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -107,7 +107,7 @@ GetNewTransactionId(bool isSubXact)
* nextXid are already present in PGPROC. Else we have a race
* condition.
*
- * XXX by storing xid into MyProc without acquiring SInvalLock, we are
+ * XXX by storing xid into MyProc without acquiring ProcArrayLock, we are
* relying on fetch/store of an xid to be atomic, else other backends
* might see a partially-set xid here. But holding both locks at once
* would be a nasty concurrency hit (and in fact could cause a
@@ -120,8 +120,7 @@ GetNewTransactionId(bool isSubXact)
*
* A solution to the atomic-store problem would be to give each PGPROC
* its own spinlock used only for fetching/storing that PGPROC's xid
- * and related fields. (SInvalLock would then mean primarily that
- * PGPROCs couldn't be added/removed while holding the lock.)
+ * and related fields.
*
* If there's no room to fit a subtransaction XID into PGPROC, set the
* cache-overflowed flag instead. This forces readers to look in