aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index a5217773ffc..f3a7a007f77 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -335,6 +335,12 @@ BootstrapModeMain(int argc, char *argv[], bool check_only)
CreateSharedMemoryAndSemaphores();
/*
+ * Estimate number of openable files. This is essential too in --check
+ * mode, because on some platforms semaphores count as open files.
+ */
+ set_max_safe_fds();
+
+ /*
* XXX: It might make sense to move this into its own function at some
* point. Right now it seems like it'd cause more code duplication than
* it's worth.