From 478846e7688c9ab73d2695a66822e9ae0574b551 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 29 Aug 2024 09:46:21 +0300 Subject: 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 --- src/backend/storage/buffer/buf_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/storage/buffer/buf_init.c') diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c index 46116a1f64b..09bec6449b6 100644 --- a/src/backend/storage/buffer/buf_init.c +++ b/src/backend/storage/buffer/buf_init.c @@ -65,7 +65,7 @@ CkptSortItem *CkptBufferIds; * postmaster, or in a standalone backend). */ void -InitBufferPool(void) +BufferManagerShmemInit(void) { bool foundBufs, foundDescs, @@ -151,13 +151,13 @@ InitBufferPool(void) } /* - * BufferShmemSize + * BufferManagerShmemSize * * compute the size of shared memory for the buffer pool including * data pages, buffer descriptors, hash tables, etc. */ Size -BufferShmemSize(void) +BufferManagerShmemSize(void) { Size size = 0; -- cgit v1.2.3