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 4ee8a153d93..98da177de94 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -39,6 +39,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"
@@ -86,6 +87,15 @@ main(int argc, char *argv[])
#endif
/*
+ * 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