Little cleanup of ShmemInit function names - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Little cleanup of ShmemInit function names
Date
Msg-id c09694ff-2453-47e5-b26c-32a16cd75ce6@iki.fi
Whole thread Raw
Responses Re: Little cleanup of ShmemInit function names
List pgsql-hackers
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)
Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Call rm_redo in a temporary memory context
Next
From: Amit Kapila
Date:
Subject: Re: Found issues related with logical replication and 2PC