From f6152cc2930b57fdcbb25e4bc594a27e3b55f157 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 27 Oct 2025 13:47:01 +1100 Subject: [PATCH v2] fix wal_level equality comments --- src/backend/access/heap/heapam.c | 2 +- src/backend/utils/cache/inval.c | 4 ++-- src/bin/pg_basebackup/pg_createsubscriber.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 5686963..dcf0279 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8891,7 +8891,7 @@ log_heap_update(Relation reln, Buffer oldbuf, * * Skip this if we're taking a full-page image of the new page, as we * don't include the new tuple in the WAL record in that case. Also - * disable if wal_level='logical', as logical decoding needs to be able to + * disable if wal_level >= logical, as logical decoding needs to be able to * read the new tuple in whole from the WAL record alone. */ if (oldbuf == newbuf && !need_tuple_data && diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index 02505c8..2b2e995 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -98,7 +98,7 @@ * likewise send the invalidation immediately, before ending the change's * critical section. This includes inplace heap updates, relmap, and smgr. * - * When wal_level=logical, write invalidations into WAL at each command end to + * When wal_level>=logical, write invalidations into WAL at each command end to * support the decoding of the in-progress transactions. See * CommandEndInvalidationMessages. * @@ -1419,7 +1419,7 @@ CommandEndInvalidationMessages(void) ProcessInvalidationMessages(&transInvalInfo->ii.CurrentCmdInvalidMsgs, LocalExecuteInvalidationMessage); - /* WAL Log per-command invalidation messages for wal_level=logical */ + /* WAL Log per-command invalidation messages for wal_level>=logical */ if (XLogLogicalInfoActive()) LogLogicalInvalidations(); diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 9fa5caa..3251f4f 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -906,7 +906,7 @@ check_publisher(const struct LogicalRepInfo *dbinfo) * Since these parameters are not a requirement for physical replication, * we should check it to make sure it won't fail. * - * - wal_level = logical + * - wal_level >= logical * - max_replication_slots >= current + number of dbs to be converted * - max_wal_senders >= current + number of dbs to be converted * - max_slot_wal_keep_size = -1 (to prevent deletion of required WAL files) -- 1.8.3.1