From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Invalid primary_slot_name triggers warnings in all processes on reload |
Date: | 2025-09-12 12:12:09 |
Message-ID: | CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
------------------------------------
$ initdb -D data
$ pg_ctl -D data start
$ psql <<EOF
ALTER SYSTEM SET log_line_prefix TO '[%b] ';
SELECT pg_reload_conf();
\! echo "primary_slot_name = 'invalid-'" >> data/postgresql.conf
SELECT pg_reload_conf();
EOF
[postmaster] WARNING: replication slot name "invalid-" contains
invalid character
[postmaster] HINT: Replication slot names may only contain lower case
letters, numbers, and the underscore character.
[postmaster] LOG: invalid value for parameter "primary_slot_name": "invalid-"
[postmaster] LOG: configuration file
"/System/Volumes/Data/dav/head-pgsql/data/postgresql.conf" contains
errors; unaffected changes were applied
[logical replication launcher] WARNING: replication slot name
"invalid-" contains invalid character
[logical replication launcher] HINT: Replication slot names may only
contain lower case letters, numbers, and the underscore character.
[checkpointer] WARNING: replication slot name "invalid-" contains
invalid character
[checkpointer] HINT: Replication slot names may only contain lower
case letters, numbers, and the underscore character.
[walwriter] WARNING: replication slot name "invalid-" contains
invalid character
[walwriter] HINT: Replication slot names may only contain lower case
letters, numbers, and the underscore character.
hrk:head-pgsql postgres$ [background writer] WARNING: replication
slot name "invalid-" contains invalid character
[background writer] HINT: Replication slot names may only contain
lower case letters, numbers, and the underscore character.
[io worker] WARNING: replication slot name "invalid-" contains
invalid character
[io worker] HINT: Replication slot names may only contain lower case
letters, numbers, and the underscore character.
[io worker] WARNING: replication slot name "invalid-" contains
invalid character
[io worker] HINT: Replication slot names may only contain lower case
letters, numbers, and the underscore character.
[autovacuum launcher] WARNING: replication slot name "invalid-"
contains invalid character
[autovacuum launcher] HINT: Replication slot names may only contain
lower case letters, numbers, and the underscore character.
[io worker] WARNING: replication slot name "invalid-" contains
invalid character
[io worker] HINT: Replication slot names may only contain lower case
letters, numbers, and the underscore character.
------------------------------------
Regards,
[1] http://postgr.es/m/CANhcyEUUWJ7XBycqFuqQg=eZ_==KT6S7E+rdMy-GE23oLa8tmQ@mail.gmail.com
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Efrain J. Berdecia | 2025-09-12 12:26:18 | Re: New recovery_target_timeline=primary option |
Previous Message | Ashutosh Sharma | 2025-09-12 11:57:59 | Re: How can end users know the cause of LR slot sync delays? |