public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
Subject: [PATCH v1 1/1] Remove reset_shared().
Date: Tue, 29 Mar 2022 14:56:47 -0700
This is now just a wrapper for CreateSharedMemoryAndSemaphores(),
and the information in the comments is already covered by comments
in the shared memory code.
---
src/backend/postmaster/postmaster.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 80bb269599..f62d12e74a 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -399,7 +399,6 @@ static void getInstallationPaths(const char *argv0);
static void checkControlFile(void);
static Port *ConnCreate(int serverFd);
static void ConnFree(Port *port);
-static void reset_shared(void);
static void SIGHUP_handler(SIGNAL_ARGS);
static void pmdie(SIGNAL_ARGS);
static void reaper(SIGNAL_ARGS);
@@ -1072,7 +1071,7 @@ PostmasterMain(int argc, char *argv[])
/*
* Set up shared memory and semaphores.
*/
- reset_shared();
+ CreateSharedMemoryAndSemaphores();
/*
* Estimate number of openable files. This must happen after setting up
@@ -2736,23 +2735,6 @@ InitProcessGlobals(void)
}
-/*
- * reset_shared -- reset shared memory and semaphores
- */
-static void
-reset_shared(void)
-{
- /*
- * Create or re-create shared memory and semaphores.
- *
- * Note: in each "cycle of life" we will normally assign the same IPC keys
- * (if using SysV shmem and/or semas). This helps ensure that we will
- * clean up dead IPC objects if the postmaster crashes and is restarted.
- */
- CreateSharedMemoryAndSemaphores();
-}
-
-
/*
* SIGHUP -- reread config files, and tell children to do same
*/
@@ -4109,7 +4091,7 @@ PostmasterStateMachine(void)
/* re-read control file into local memory */
LocalProcessControlFile(true);
- reset_shared();
+ CreateSharedMemoryAndSemaphores();
StartupPID = StartupDataBase();
Assert(StartupPID != 0);
--
2.25.1
--MGYHOYXEY6WxJCY8--
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH v1 1/1] Remove reset_shared().
In-Reply-To: <no-message-id-1860659@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox