From 733de7d4b44df452ca8a584715991b0902468a3f Mon Sep 17 00:00:00 2001 From: Takashi Menjo Date: Tue, 8 Dec 2020 16:28:55 +0900 Subject: [PATCH v3 09/10] Do not open an existing WAL segment when creating just before mapping This commit fixes the commit "Create a new WAL segment just before mapping" (598c5e6768cb90118741d5350da24eaf9a340add). --- src/backend/access/transam/xlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 5a6304176b..b4fa70aa2f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3431,7 +3431,7 @@ XLogFileMap(XLogSegNo segno, bool *is_pmem) fd = BasicOpenFile(path, O_RDWR | PG_BINARY); if (fd < 0) { - bool use_existent = true; + bool use_existent = false; /* * Create a new logfile segment if not exists. This is an exceptional -- 2.25.1