summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2020-05-15 22:11:03 +0000
committerTom Lane2020-05-15 22:11:07 +0000
commit36ac359d3621578cefc2156a3917024cdd3b1829 (patch)
treefa625d5a03040cb31284a531ccee7615bb6fb246 /src/include
parenta0ab4f4909a3f52e8b8243d2ae2dbb6f5027136c (diff)
Rename assorted LWLock tranches.
Choose names that fit into the conventions for wait event names (particularly, that multi-word names are in the style MultiWordName) and hopefully convey more information to non-hacker users than the previous names did. Also rename SerializablePredicateLockListLock to SerializablePredicateListLock; the old name was long enough to cause table formatting problems, plus the double occurrence of "Lock" seems confusing/error-prone. Also change a couple of particularly opaque LWLock field names. Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/lwlock.h18
-rw-r--r--src/include/storage/predicate_internals.h8
-rw-r--r--src/include/storage/proc.h4
3 files changed, 16 insertions, 14 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 19ff265a4d4..d8e1b5c493e 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -204,22 +204,22 @@ typedef enum BuiltinTrancheIds
LWTRANCHE_SERIAL_BUFFER,
LWTRANCHE_WAL_INSERT,
LWTRANCHE_BUFFER_CONTENT,
- LWTRANCHE_BUFFER_IO_IN_PROGRESS,
- LWTRANCHE_REPLICATION_ORIGIN,
- LWTRANCHE_REPLICATION_SLOT_IO_IN_PROGRESS,
- LWTRANCHE_PROC,
+ LWTRANCHE_BUFFER_IO,
+ LWTRANCHE_REPLICATION_ORIGIN_STATE,
+ LWTRANCHE_REPLICATION_SLOT_IO,
+ LWTRANCHE_LOCK_FASTPATH,
LWTRANCHE_BUFFER_MAPPING,
LWTRANCHE_LOCK_MANAGER,
LWTRANCHE_PREDICATE_LOCK_MANAGER,
LWTRANCHE_PARALLEL_HASH_JOIN,
LWTRANCHE_PARALLEL_QUERY_DSA,
- LWTRANCHE_SESSION_DSA,
- LWTRANCHE_SESSION_RECORD_TABLE,
- LWTRANCHE_SESSION_TYPMOD_TABLE,
+ LWTRANCHE_PER_SESSION_DSA,
+ LWTRANCHE_PER_SESSION_RECORD_TYPE,
+ LWTRANCHE_PER_SESSION_RECORD_TYPMOD,
LWTRANCHE_SHARED_TUPLESTORE,
- LWTRANCHE_TBM,
+ LWTRANCHE_SHARED_TIDBITMAP,
LWTRANCHE_PARALLEL_APPEND,
- LWTRANCHE_SXACT,
+ LWTRANCHE_PER_XACT_PREDICATE_LIST,
LWTRANCHE_FIRST_USER_DEFINED
} BuiltinTrancheIds;
diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h
index 591ac6f42aa..cf9694d65e3 100644
--- a/src/include/storage/predicate_internals.h
+++ b/src/include/storage/predicate_internals.h
@@ -92,8 +92,12 @@ typedef struct SERIALIZABLEXACT
SHM_QUEUE finishedLink; /* list link in
* FinishedSerializableTransactions */
- LWLock predicateLockListLock; /* protects predicateLocks in parallel
- * mode */
+ /*
+ * perXactPredicateListLock is only used in parallel queries: it protects
+ * this SERIALIZABLEXACT's predicate lock list against other workers of
+ * the same session.
+ */
+ LWLock perXactPredicateListLock;
/*
* for r/o transactions: list of concurrent r/w transactions that we could
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index ae4f573ab46..1ee9000b2b9 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -188,10 +188,8 @@ struct PGPROC
XLogRecPtr clogGroupMemberLsn; /* WAL location of commit record for clog
* group member */
- /* Per-backend LWLock. Protects fields below (but not group fields). */
- LWLock backendLock;
-
/* Lock manager data, recording fast-path locks taken by this backend. */
+ LWLock fpInfoLock; /* protects per-backend fast-path state */
uint64 fpLockBits; /* lock modes held for each fast-path slot */
Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]; /* slots for rel oids */
bool fpVXIDLock; /* are we holding a fast-path VXID lock? */