Subject: [PATCH v2 12/12] Move away from argv string comparison

From: Mike Palmiotto <[email-masked]>
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--