summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-09-30 18:57:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-09-30 18:57:45 +0000
commitf9f258281e0b3ccae1ca3e349f527e4b64c898ba (patch)
tree24b7fc305bbddfbc76d82b9d4acea5e7795e9f60 /src/backend/utils/misc/guc.c
parent40ed132ce7a006ec8c54d5c97738563c1d7d05f3 (diff)
Create a GUC parameter max_files_per_process that is a configurable
upper limit on what we will believe from sysconf(_SC_OPEN_MAX). The default value is 1000, so that under ordinary conditions it won't affect the behavior. But on platforms where the kernel promises far more than it can deliver, this can be used to prevent running out of file descriptors. See numerous past discussions, eg, pgsql-hackers around 23-Dec-2000.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 6efd41c2a8e..c8a9a0afc28 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4,7 +4,7 @@
* Support for grand unified configuration scheme, including SET
* command, configuration file, and command line options.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.53 2001/09/29 04:02:25 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.54 2001/09/30 18:57:45 tgl Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -31,6 +31,7 @@
#include "optimizer/paths.h"
#include "optimizer/planmain.h"
#include "parser/parse_expr.h"
+#include "storage/fd.h"
#include "storage/freespace.h"
#include "storage/lock.h"
#include "storage/proc.h"
@@ -302,6 +303,9 @@ static struct config_int
{"vacuum_mem", PGC_USERSET, &VacuumMem,
8192, 1024, INT_MAX, NULL, NULL},
+ {"max_files_per_process", PGC_BACKEND, &max_files_per_process,
+ 1000, 25, INT_MAX, NULL, NULL},
+
{"debug_level", PGC_USERSET, &DebugLvl,
0, 0, 16, NULL, NULL},