summaryrefslogtreecommitdiff
path: root/src/include/miscadmin.h
diff options
context:
space:
mode:
authorTom Lane2004-03-24 22:40:29 +0000
committerTom Lane2004-03-24 22:40:29 +0000
commit8899a2aba92c4a17f422172e7c9dd0e383eefa39 (patch)
treeaea400d25b0e9c32b84004728c995cd53ab33533 /src/include/miscadmin.h
parenta09b9a36d3cc8e4c5cd2877b2b764dc14a78f58e (diff)
Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution stack depth, as per my proposal of 30-Dec. This gives us a fairly bulletproof defense against crashing due to runaway recursive functions.
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r--src/include/miscadmin.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index f34ebb09865..4aba00bb713 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -1,18 +1,19 @@
/*-------------------------------------------------------------------------
*
* miscadmin.h
- * this file contains general postgres administration and initialization
+ * This file contains general postgres administration and initialization
* stuff that used to be spread out between the following files:
* globals.h global variables
* pdir.h directory path crud
* pinit.h postgres initialization
* pmod.h processing modes
- *
+ * Over time, this has also become the preferred place for widely known
+ * resource-limitation stuff, such as work_mem and check_stack_depth().
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.154 2004/03/23 01:23:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.155 2004/03/24 22:40:29 tgl Exp $
*
* NOTES
* some of the information in this file should be moved to
@@ -70,7 +71,7 @@ extern volatile bool ImmediateInterruptOK;
extern volatile uint32 InterruptHoldoffCount;
extern volatile uint32 CritSectionCount;
-/* in postgres.c */
+/* in tcop/postgres.c */
extern void ProcessInterrupts(void);
#ifndef WIN32
@@ -224,6 +225,10 @@ extern char *UnixSocketDir;
extern char *ListenAddresses;
+/* in tcop/postgres.c */
+extern void check_stack_depth(void);
+
+
/*****************************************************************************
* pdir.h -- *
* POSTGRES directory path definitions. *