mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
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
This commit is contained in:
parent
4d22173ec0
commit
eb21f5bc67
@ -380,7 +380,7 @@ AutoVacLauncherMain(char *startup_data, size_t startup_data_len)
|
||||
if (PostAuthDelay)
|
||||
pg_usleep(PostAuthDelay * 1000000L);
|
||||
|
||||
SetProcessingMode(InitProcessing);
|
||||
Assert(GetProcessingMode() == InitProcessing);
|
||||
|
||||
/*
|
||||
* Set up signal handlers. We operate on databases much like a regular
|
||||
@ -1373,7 +1373,7 @@ AutoVacWorkerMain(char *startup_data, size_t startup_data_len)
|
||||
MyBackendType = B_AUTOVAC_WORKER;
|
||||
init_ps_display(NULL);
|
||||
|
||||
SetProcessingMode(InitProcessing);
|
||||
Assert(GetProcessingMode() == InitProcessing);
|
||||
|
||||
/*
|
||||
* Set up signal handlers. We operate on databases much like a regular
|
||||
|
@ -54,7 +54,8 @@ AuxiliaryProcessMainCommon(void)
|
||||
|
||||
init_ps_display(NULL);
|
||||
|
||||
SetProcessingMode(BootstrapProcessing);
|
||||
Assert(GetProcessingMode() == InitProcessing);
|
||||
|
||||
IgnoreSystemIndexes = true;
|
||||
|
||||
/*
|
||||
|
@ -746,7 +746,7 @@ BackgroundWorkerMain(char *startup_data, size_t startup_data_len)
|
||||
MyBackendType = B_BG_WORKER;
|
||||
init_ps_display(worker->bgw_name);
|
||||
|
||||
SetProcessingMode(InitProcessing);
|
||||
Assert(GetProcessingMode() == InitProcessing);
|
||||
|
||||
/* Apply PostAuthDelay */
|
||||
if (PostAuthDelay > 0)
|
||||
|
@ -1342,7 +1342,7 @@ ReplSlotSyncWorkerMain(char *startup_data, size_t startup_data_len)
|
||||
|
||||
init_ps_display(NULL);
|
||||
|
||||
SetProcessingMode(InitProcessing);
|
||||
Assert(GetProcessingMode() == InitProcessing);
|
||||
|
||||
/*
|
||||
* Create a per-backend PGPROC struct in shared memory. We must do this
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user