aboutsummaryrefslogtreecommitdiff
path: root/src/include/postgres.h
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-06-20 11:06:42 +0200
committerAndres Freund <andres@anarazel.de>2014-06-20 11:09:17 +0200
commit3bdcf6a5a7555035810e2ba2b8a0fb04dc5c66b8 (patch)
treeca974ea8843cb59f1ea8616f0f742e9faa5e8dbe /src/include/postgres.h
parent45b0f357235236dd3198f8abcca277adc0d7459a (diff)
downloadpostgresql-3bdcf6a5a7555035810e2ba2b8a0fb04dc5c66b8.tar.gz
postgresql-3bdcf6a5a7555035810e2ba2b8a0fb04dc5c66b8.zip
Don't allow to disable backend assertions via the debug_assertions GUC.
The existance of the assert_enabled variable (backing the debug_assertions GUC) reduced the amount of knowledge some static code checkers (like coverity and various compilers) could infer from the existance of the assertion. That could have been solved by optionally removing the assertion_enabled variable from the Assert() et al macros at compile time when some special macro is defined, but the resulting complication doesn't seem to be worth the gain from having debug_assertions. Recompiling is fast enough. The debug_assertions GUC is still available, but readonly, as it's useful when diagnosing problems. The commandline/client startup option -A, which previously also allowed to enable/disable assertions, has been removed as it doesn't serve a purpose anymore. While at it, reduce code duplication in bufmgr.c and localbuf.c assertions checking for spurious buffer pins. That code had to be reindented anyway to cope with the assert_enabled removal.
Diffstat (limited to 'src/include/postgres.h')
-rw-r--r--src/include/postgres.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 00fbaaf91bc..b123813bc47 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -680,13 +680,10 @@ extern Datum Float8GetDatum(float8 X);
*/
/*
- * These declarations supports the assertion-related macros in c.h.
- * assert_enabled is here because that file doesn't have PGDLLIMPORT in the
- * right place, and ExceptionalCondition must be present, for the backend only,
- * even when assertions are not enabled.
+ * Backend only infrastructure for the the assertion-related macros in c.h.
+ *
+ * ExceptionalCondition must be present even when assertions are not enabled.
*/
-extern PGDLLIMPORT bool assert_enabled;
-
extern void ExceptionalCondition(const char *conditionName,
const char *errorType,
const char *fileName, int lineNumber) __attribute__((noreturn));