diff options
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 3ce088f0bad..85902788181 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -4099,9 +4099,19 @@ PostgresSingleUserMain(int argc, char *argv[], */ InitializeWalConsistencyChecking(); + /* + * Create shared memory etc. (Nothing's really "shared" in single-user + * mode, but we must have these data structures anyway.) + */ CreateSharedMemoryAndSemaphores(); /* + * Estimate number of openable files. This must happen after setting up + * semaphores, because on some platforms semaphores count as open files. + */ + set_max_safe_fds(); + + /* * Remember stand-alone backend startup time,roughly at the same point * during startup that postmaster does so. */ |