Re: Invalid primary_slot_name triggers warnings in all processes on reload
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-18T13:54:46Z
Lists: pgsql-hackers
Attachments
- v1-0001-Reduce-log-level-for-invalid-primary_slot_name-in.patch (application/octet-stream) patch v1-0001
On Fri, Sep 12, 2025 at 9:12 PM Fujii Masao <masao.fujii@gmail.com> wrote: > > Hi, > > While reviewing the patch at [1], I noticed that if primary_slot_name is > set to an invalid slot name in postgresql.conf and the configuration file > is reloaded, all running postgres processes emit the WARNING message > as follows. Isn't this a bug? > > To fix this issue, GUC_check_errmsg() should be used instead of ereport() > when an invalid slot name is found in the setting. Thoughts? Another simple fix would be to have processes other than the postmaster report invalid primary_slot_name at DEBUG3 instead of WARNING. In that case, only the postmaster reports it at WARNING, so by default only that message appears in the log file. This matches the behavior for other GUC parameters with invalid settings. I've attached a patch implementing this approach. Thought? -- Fujii Masao
Commits
-
Make invalid primary_slot_name follow standard GUC error reporting.
- b00a16baeb2a 13.23 landed
- f106f53df6f5 14.20 landed
- caf529aba22d 15.15 landed
- 4fd916eab99c 16.11 landed
- 1db2870bb5ab 17.7 landed
- 6ff7ba9fe525 18.1 landed
- f33e60a53a9c 19 (unreleased) landed