| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Make invalid primary_slot_name follow standard GUC error reporti |
| Date: | 2025-10-22 11:15:11 |
| Message-ID: | E1vBWoB-002wGH-0W@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)fujii(at)gmail(dot)com>
Reviewed-by: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6ff7ba9fe525fd64cdafb242867d8d22486b88d9
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 13 ++++++-
src/backend/replication/slot.c | 65 ++++++++++++++++++++++++-------
src/include/replication/slot.h | 2 +
3 files changed, 64 insertions(+), 16 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2025-10-22 11:15:27 | pgsql: Make invalid primary_slot_name follow standard GUC error reporti |
| Previous Message | Fujii Masao | 2025-10-22 11:14:42 | pgsql: Make invalid primary_slot_name follow standard GUC error reporti |