From f9f258281e0b3ccae1ca3e349f527e4b64c898ba Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 30 Sep 2001 18:57:45 +0000 Subject: 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. --- src/backend/utils/misc/guc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/misc/guc.c') 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 . @@ -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}, -- cgit v1.2.3