aboutsummaryrefslogtreecommitdiff
path: root/src/backend/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/main/main.c')
-rw-r--r--src/backend/main/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index c1d0a9605d3..10ed18c281f 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -38,6 +38,7 @@
#include "postmaster/postmaster.h"
#include "tcop/tcopprot.h"
#include "utils/help_config.h"
+#include "utils/memutils.h"
#include "utils/pg_locale.h"
#include "utils/ps_status.h"
#ifdef WIN32
@@ -79,6 +80,15 @@ main(int argc, char *argv[])
argv = save_ps_display_args(argc, argv);
/*
+ * Fire up essential subsystems: error and memory management
+ *
+ * Code after this point is allowed to use elog/ereport, though
+ * localization of messages may not work right away, and messages won't go
+ * anywhere but stderr until GUC settings get loaded.
+ */
+ MemoryContextInit();
+
+ /*
* Set up locale information from environment. Note that LC_CTYPE and
* LC_COLLATE will be overridden later from pg_control if we are in an
* already-initialized database. We set them here so that they will be