public inbox for [email protected]
help / color / mirror / Atom feedFrom: Mike Palmiotto <[email protected]>
Subject: [PATCH v2 12/12] Move away from argv string comparison
Date: Tue, 17 Mar 2020 14:43:52 -0400
---
src/backend/postmaster/postmaster.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 65305a18ee..b31fcc7d12 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -4883,7 +4883,7 @@ SubPostmasterMain(int argc, char *argv[])
ConnProcPort = &port;
/* Close the postmaster's sockets (as soon as we know them) */
- ClosePostmasterPorts(strcmp(argv[1], "--forklog") == 0);
+ ClosePostmasterPorts(MySubprocessType == SysLoggerType);
/*
* Set reference point for stack-depth checking
@@ -4928,9 +4928,9 @@ SubPostmasterMain(int argc, char *argv[])
PGSharedMemoryNoReAttach();
/* autovacuum needs this set before calling InitProcess */
- if (strcmp(argv[1], "--forkavlauncher") == 0)
+ if (MySubprocessType == AutoVacuumLauncherType)
AutovacuumLauncherIAm();
- if (strcmp(argv[1], "--forkavworker") == 0)
+ if (MySubprocessType == AutoVacuumWorkerType)
AutovacuumWorkerIAm();
/*
--
2.17.0
--FcSpk3Icpd/Pbul4--
view thread (25+ 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 v2 12/12] Move away from argv string comparison
In-Reply-To: <no-message-id-1882624@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