From 1bb3d1384dcfe2e591eab15f3e774e5f9afa8a44 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 v4 6/9] 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 0986dbc0a1..e3e28fb9d3 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 9cc2e1f458..1b0b75467c 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

