From 24a24974fd96135c36836d819a5a56e28c3f4d7c 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 v5 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 70e54eee4f..a51847cb7a 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -113,7 +113,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 5ba37ffcdc..cd677a4c97 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -90,7 +90,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

