diff options
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 24e84043e29..90c2f4a5e32 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -4628,7 +4628,8 @@ SubPostmasterMain(int argc, char *argv[]) /* * If appropriate, physically re-attach to shared memory segment. We want * to do this before going any further to ensure that we can attach at the - * same address the postmaster used. + * same address the postmaster used. On the other hand, if we choose not + * to re-attach, we may have other cleanup to do. */ if (strcmp(argv[1], "--forkbackend") == 0 || strcmp(argv[1], "--forkavlauncher") == 0 || @@ -4636,6 +4637,8 @@ SubPostmasterMain(int argc, char *argv[]) strcmp(argv[1], "--forkboot") == 0 || strncmp(argv[1], "--forkbgworker=", 15) == 0) PGSharedMemoryReAttach(); + else + PGSharedMemoryNoReAttach(); /* autovacuum needs this set before calling InitProcess */ if (strcmp(argv[1], "--forkavlauncher") == 0) |