From 1e101b99789ce947913b597eaada66e639d2bc38 Mon Sep 17 00:00:00 2001
From: Takashi Menjo <takashi.menjou.vg@hco.ntt.co.jp>
Date: Wed, 13 Oct 2021 11:10:17 +0900
Subject: [PATCH v6 08/11] Let wal_pmem_map be constant unless --with-libpmem

---
 src/backend/access/transam/xlog.c | 3 +++
 src/include/access/xlog.h         | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index be56599f9f..62f08cb50b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -116,7 +116,10 @@ int			CommitSiblings = 5; /* # concurrent xacts needed to sleep */
 int			wal_retrieve_retry_interval = 5000;
 int			max_slot_wal_keep_size_mb = -1;
 bool		track_wal_io_timing = false;
+
+#ifdef USE_LIBPMEM
 bool		wal_pmem_map = false;
+#endif
 
 #ifdef WAL_DEBUG
 bool		XLOG_DEBUG = false;
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 73900cbc9e..ab3eb3887b 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -88,7 +88,12 @@ extern char *PrimaryConnInfo;
 extern char *PrimarySlotName;
 extern bool wal_receiver_create_temp_slot;
 extern bool track_wal_io_timing;
+
+#ifdef USE_LIBPMEM
 extern bool wal_pmem_map;
+#else
+#define wal_pmem_map false
+#endif
 
 /* indirectly set via GUC system */
 extern TransactionId recoveryTargetXid;
-- 
2.25.1

