aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-07-02 20:14:40 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-07-02 20:14:40 +0300
commiteb21f5bc67a02eb6f7de1bd2f07acdd471a4d320 (patch)
tree8c8eca759905914f2c02a50e3c7966c2ec017a5c /src/backend/tcop/postgres.c
parent4d22173ec08cfdb83f61cfff1d6fa67fe7d83296 (diff)
downloadpostgresql-eb21f5bc67a02eb6f7de1bd2f07acdd471a4d320.tar.gz
postgresql-eb21f5bc67a02eb6f7de1bd2f07acdd471a4d320.zip
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 <higuoxing@gmail.com> Discussion: https://www.postgresql.org/message-id/CACpMh%2BDBHVT4xPGimzvex%3DwMdMLQEu9PYhT%2BkwwD2x2nu9dU_Q%40mail.gmail.com
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c2
1 files changed, 1 insertions, 1 deletions
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