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 <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Reviewed-by: Hayato Kuroda <[email protected]> Discussion: https://postgr.es/m/cahgqgwfud-cvthctfusbfkhbs6jj6kdaptdlwkvp2qjux6l...@mail.gmail.com Backpatch-through: 13 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4fd916eab99c63410a084ab41dd5eb53328e45dc Modified Files -------------- src/backend/access/transam/xlogrecovery.c | 13 ++++++- src/backend/replication/slot.c | 59 +++++++++++++++++++++++-------- src/include/replication/slot.h | 2 ++ 3 files changed, 58 insertions(+), 16 deletions(-)
