Little cleanup of ShmemInit function names
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-08-07T12:08:42Z
Lists: pgsql-hackers
Attachments
- v1-0001-Refactor-lock-manager-initialization-to-make-it-a.patch (text/x-patch) patch v1-0001
- v1-0002-Rename-some-shared-memory-initialization-routines.patch (text/x-patch) patch v1-0002
It's bothered me for a long time that some of the shmem initialization functions have non-standard names. Most of them are called FoobarShmemSize() and FoobarShmemInit(), but there are a few exceptions: InitBufferPool InitLocks InitPredicateLocks CreateSharedProcArray CreateSharedBackendStatus CreateSharedInvalidationState I always have trouble remembering what exactly these functions do and when get called. But they are the same as all the FoobarShmemInit() functions, just named differently. The attached patches rename them to follow the usual naming convention. The InitLocks() function is refactored a bit more, splitting the per-backend initialization to a separate InitLockManagerAccess() function. That's why it's in a separate commit. -- Heikki Linnakangas Neon (https://neon.tech)
Commits
-
Rename some shared memory initialization routines
- 478846e7688c 18.0 landed
-
Refactor lock manager initialization to make it a bit less special
- fbce7dfc77ea 18.0 landed