pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make invalid primary_slot_name follow standard GUC error reporti
Date: Wed, 22 Oct 2025 11:16:03 +0000
Message-ID: <E1vBWp1-002wIq-0c@gemulon.postgresql.org> (raw)

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f106f53df6f58cb3559b3e8b825a048f04863c52

Modified Files
--------------
src/backend/replication/slot.c | 59 +++++++++++++++++++++++++++++++-----------
src/backend/utils/misc/guc.c   | 13 +++++++++-
src/include/replication/slot.h |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1vBWp1-002wIq-0c@gemulon.postgresql.org>
Permalink:  ../E1vBWp1-002wIq-0c@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vBWp1-002wIq-0c@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make invalid primary_slot_name follow standard GUC error reporti
  In-Reply-To: <E1vBWp1-002wIq-0c@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox