1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Rename some shared memory initialization routines

To make them follow the usual naming convention where
FoobarShmemSize() calculates the amount of shared memory needed by
Foobar subsystem, and FoobarShmemInit() performs the initialization.

I didn't rename CreateLWLocks() and InitShmmeIndex(), because they are
a little special. They need to be called before any of the other
ShmemInit() functions, because they set up the shared memory
bookkeeping itself. I also didn't rename InitProcGlobal(), because
unlike other Shmeminit functions, it's not called by individual
backends.

Reviewed-by: Andreas Karlsson
Discussion: https://www.postgresql.org/message-id/c09694ff-2453-47e5-b26c-32a16cd75ce6@iki.fi
This commit is contained in:
Heikki Linnakangas
2024-08-29 09:46:21 +03:00
parent fbce7dfc77
commit 478846e768
14 changed files with 33 additions and 33 deletions

View File

@@ -249,7 +249,7 @@ extern Buffer ExtendBufferedRelTo(BufferManagerRelation bmr,
BlockNumber extend_to,
ReadBufferMode mode);
extern void InitBufferPoolAccess(void);
extern void InitBufferManagerAccess(void);
extern void AtEOXact_Buffers(bool isCommit);
extern char *DebugPrintBufferRefcount(Buffer buffer);
extern void CheckPointBuffers(int flags);
@@ -300,8 +300,8 @@ extern void LimitAdditionalLocalPins(uint32 *additional_pins);
extern bool EvictUnpinnedBuffer(Buffer buf);
/* in buf_init.c */
extern void InitBufferPool(void);
extern Size BufferShmemSize(void);
extern void BufferManagerShmemInit(void);
extern Size BufferManagerShmemSize(void);
/* in localbuf.c */
extern void AtProcExit_LocalBuffers(void);