aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index cdd71a9bc33..578af2e66d8 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -24,6 +24,7 @@
#include "catalog/index.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
+#include "common/link-canary.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
@@ -503,6 +504,13 @@ BootstrapModeMain(void)
Assert(IsBootstrapProcessingMode());
/*
+ * To ensure that src/common/link-canary.c is linked into the backend, we
+ * must call it from somewhere. Here is as good as anywhere.
+ */
+ if (pg_link_canary_is_frontend())
+ elog(ERROR, "backend is incorrectly linked to frontend functions");
+
+ /*
* Do backend-like initialization for bootstrap mode
*/
InitProcess();