postgresql/src/include/replication
Fujii Masao 1db2870bb5 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
2025-10-22 20:11:47 +09:00
..
decode.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logical.h Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
logicallauncher.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalproto.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalrelation.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalworker.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
message.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
origin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
output_plugin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgoutput.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
reorderbuffer.h Fix re-distributing previously distributed invalidation messages during logical decoding. 2025-06-16 17:35:58 -07:00
slot.h Make invalid primary_slot_name follow standard GUC error reporting. 2025-10-22 20:11:47 +09:00
slotsync.h Remove unused function prototype 2024-04-19 09:58:04 +02:00
snapbuild.h Fix possibility of logical decoding partial transaction changes. 2024-07-11 22:48:21 +09:00
syncrep.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
walreceiver.h Refactor postmaster child process launching 2024-03-18 11:35:30 +02:00
walsender.h Introduce a new GUC 'standby_slot_names'. 2024-03-08 08:10:45 +05:30
walsender_private.h Fix race with synchronous_standby_names at startup 2025-04-11 10:02:15 +09:00
worker_internal.h Update copyright for 2024 2024-01-03 20:49:05 -05:00