diff options
| author | Heikki Linnakangas | 2024-08-29 06:46:06 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2024-08-29 06:46:06 +0000 |
| commit | fbce7dfc77eaa0d017dfee78c9d27b142d435e41 (patch) | |
| tree | f487307260e77e8dc67b7df72d29b42e0792a9f9 /src/include | |
| parent | 9f87da1cffda0e07ff3babcfa84abe9e849ccd95 (diff) | |
Refactor lock manager initialization to make it a bit less special
Split the shared and local initialization to separate functions, and
follow the common naming conventions. With this, we no longer create
the LockMethodLocalHash hash table in the postmaster process, which
was always pointless.
Reviewed-by: Andreas Karlsson
Discussion: https://www.postgresql.org/message-id/c09694ff-2453-47e5-b26c-32a16cd75ce6@iki.fi
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/lock.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index cc1f6e78c39..8b328a06d9e 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -544,7 +544,9 @@ typedef enum /* * function prototypes */ -extern void InitLocks(void); +extern void LockManagerShmemInit(void); +extern Size LockManagerShmemSize(void); +extern void InitLockManagerAccess(void); extern LockMethod GetLocksMethodTable(const LOCK *lock); extern LockMethod GetLockTagsMethodTable(const LOCKTAG *locktag); extern uint32 LockTagHashCode(const LOCKTAG *locktag); @@ -584,7 +586,6 @@ extern bool LockCheckConflicts(LockMethod lockMethodTable, extern void GrantLock(LOCK *lock, PROCLOCK *proclock, LOCKMODE lockmode); extern void GrantAwaitedLock(void); extern void RemoveFromWaitQueue(PGPROC *proc, uint32 hashcode); -extern Size LockShmemSize(void); extern LockData *GetLockStatusData(void); extern BlockedProcsData *GetBlockerStatusData(int blocked_pid); |
