From 41feb8927ee1b121dc46038fcf80e5c26c08b3d6 Mon Sep 17 00:00:00 2001
From: Takashi Menjo <takashi.menjou.vg@hco.ntt.co.jp>
Date: Fri, 7 Jan 2022 11:06:46 +0900
Subject: [PATCH v7 05/15] Comment for constant wal_pmem_map

This may melt into "Let wal_pmem_map be constant unless --with-libpmem".
---
 src/include/access/xlog.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index ab3eb3887b..eb0987313e 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -92,6 +92,12 @@ extern bool track_wal_io_timing;
 #ifdef USE_LIBPMEM
 extern bool wal_pmem_map;
 #else
+/*
+ * If USE_LIBPMEM is not defined (that is, no --with-libpmem), wal_pmem_map
+ * is always false and is never used essentially. Using #if(n)def everywhere
+ * is not good for code readability, so let wal_pmem_map be constant. This
+ * may help compilers optimize conditional branches.
+ */
 #define wal_pmem_map false
 #endif
 
-- 
2.25.1

