aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlog.c13
-rw-r--r--src/backend/utils/init/postinit.c6
2 files changed, 6 insertions, 13 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index e073121a7e7..355d1737c39 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8677,9 +8677,6 @@ InitXLOGAccess(void)
(void) GetRedoRecPtr();
/* Also update our copy of doPageWrites. */
doPageWrites = (Insert->fullPageWrites || Insert->forcePageWrites);
-
- /* Also initialize the working areas for constructing WAL records */
- InitXLogInsert();
}
/*
@@ -9130,16 +9127,6 @@ CreateCheckPoint(int flags)
elog(ERROR, "can't create a checkpoint during recovery");
/*
- * Initialize InitXLogInsert working areas before entering the critical
- * section. Normally, this is done by the first call to
- * RecoveryInProgress() or LocalSetXLogInsertAllowed(), but when creating
- * an end-of-recovery checkpoint, the LocalSetXLogInsertAllowed call is
- * done below in a critical section, and InitXLogInsert cannot be called
- * in a critical section.
- */
- InitXLogInsert();
-
- /*
* Prepare to accumulate statistics.
*
* Note: because it is possible for log_checkpoints to change while a
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 78bc64671ec..0c56c38a141 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -541,6 +541,12 @@ BaseInit(void)
* file shutdown hook can report temporary file statistics.
*/
InitTemporaryFileAccess();
+
+ /*
+ * Initialize local buffers for WAL record construction, in case we
+ * ever try to insert XLOG.
+ */
+ InitXLogInsert();
}