summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2001-09-30 18:57:45 +0000
committerTom Lane2001-09-30 18:57:45 +0000
commitf9f258281e0b3ccae1ca3e349f527e4b64c898ba (patch)
tree24b7fc305bbddfbc76d82b9d4acea5e7795e9f60 /src/include
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/include')
-rw-r--r--src/include/storage/fd.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index f3e06978a6..3526be1a1e 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: fd.h,v 1.30 2001/06/11 04:12:29 tgl Exp $
+ * $Id: fd.h,v 1.31 2001/09/30 18:57:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,6 +43,11 @@ typedef char *FileName;
typedef int File;
+
+/* GUC parameter */
+extern int max_files_per_process;
+
+
/*
* prototypes for functions in fd.c
*/