Subject: [PATCH v2 1/1] don't emit shutdown messages for 'postgres -C' with runtime-computed GUCs

From: Nathan Bossart <[email-masked]>
Date: Tue, 15 Mar 2022 15:36:41 -0700

---
 src/backend/postmaster/postmaster.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 80bb269599..bf48bc6326 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1066,6 +1066,10 @@ PostmasterMain(int argc, char *argv[])
 												 false, false);
 
 		puts(config_val ? config_val : "");
+
+		/* don't emit shutdown messages */
+		SetConfigOption("log_min_messages", "PANIC", PGC_INTERNAL, PGC_S_OVERRIDE);
+
 		ExitPostmaster(0);
 	}
 
-- 
2.25.1

--82I3+IH0IqGh5yIs--