mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
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
This commit is contained in:
@@ -116,7 +116,7 @@ CalculateShmemSize(int *num_semaphores)
|
||||
size = add_size(size, dsm_estimate_size());
|
||||
size = add_size(size, DSMRegistryShmemSize());
|
||||
size = add_size(size, BufferShmemSize());
|
||||
size = add_size(size, LockShmemSize());
|
||||
size = add_size(size, LockManagerShmemSize());
|
||||
size = add_size(size, PredicateLockShmemSize());
|
||||
size = add_size(size, ProcGlobalShmemSize());
|
||||
size = add_size(size, XLogPrefetchShmemSize());
|
||||
@@ -291,7 +291,7 @@ CreateOrAttachShmemStructs(void)
|
||||
/*
|
||||
* Set up lock manager
|
||||
*/
|
||||
InitLocks();
|
||||
LockManagerShmemInit();
|
||||
|
||||
/*
|
||||
* Set up predicate lock manager
|
||||
|
||||
Reference in New Issue
Block a user