From eb21f5bc67a02eb6f7de1bd2f07acdd471a4d320 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 2 Jul 2024 20:14:40 +0300 Subject: Remove redundant SetProcessingMode(InitProcessing) calls After several refactoring iterations, auxiliary processes are no longer initialized from the bootstrapper. Using the InitProcessing mode for initializing auxiliary processes is more appropriate. Since the global variable Mode is initialized to InitProcessing, we can just remove the redundant calls of SetProcessingMode(InitProcessing). Author: Xing Guo Discussion: https://www.postgresql.org/message-id/CACpMh%2BDBHVT4xPGimzvex%3DwMdMLQEu9PYhT%2BkwwD2x2nu9dU_Q%40mail.gmail.com --- src/backend/tcop/postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index adf71c69026..e39c6804a73 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -4161,7 +4161,7 @@ PostgresMain(const char *dbname, const char *username) Assert(dbname != NULL); Assert(username != NULL); - SetProcessingMode(InitProcessing); + Assert(GetProcessingMode() == InitProcessing); /* * Set up signal handlers. (InitPostmasterChild or InitStandaloneProcess -- cgit v1.2.3