Subject: pgsql: pg_resetwal: Fix incorrect error message related to pg_wal/summa

From: Michael Paquier <[email-masked]>
Date: Wed, 04 Feb 2026 07:38:52 +0000

pg_resetwal: Fix incorrect error message related to pg_wal/summaries/

A failure while closing pg_wal/summaries/ incorrectly generated a report
about pg_wal/archive_status/.

While at it, this commit adds #undefs for the macros used in
KillExistingWALSummaries() and KillExistingArchiveStatus() to prevent
those values from being misused in an incorrect function context.

Oversight in dc212340058b.

Author: Tianchen Zhang <[email-masked]>
Reviewed-by: Chao Li <[email-masked]>
Reviewed-by: Kyotaro Horiguchi <[email-masked]>
Discussion: https://postgr.es/m/[email-masked]
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/263af458e4ceb0c17e717a2cafd648908aeb4911

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)