Re: issue with synchronized_standby_slots - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: issue with synchronized_standby_slots
Date
Msg-id CAA4eK1+qUzXVx1T+A0eNuwyMrty6=ZObNJmjhPXSDjreDjDQqw@mail.gmail.com
Whole thread Raw
In response to Re: issue with synchronized_standby_slots  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Responses Re: issue with synchronized_standby_slots
List pgsql-hackers
On Fri, Sep 12, 2025 at 2:34 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> I have attached the updated v4 patch
>

+# Cannot be set synchronized_standby_slots to a reserved slot name
+($result, $stdout, $stderr) = $primary->psql('postgres',
+ "ALTER SYSTEM SET synchronized_standby_slots='pg_conflict_detection'");
+ok( $stderr =~
+   m/WARNING:  replication slot name "pg_conflict_detection" is reserved/,
+ "Cannot use a reserverd slot name");
+
+# Cannot be set synchronized_standby_slots to slot name with invalid characters
+($result, $stdout, $stderr) = $primary->psql('postgres',
+ "ALTER SYSTEM SET synchronized_standby_slots='invalid*'");
+ok( $stderr =~
+   m/WARNING:  replication slot name "invalid\*" contains invalid character/,
+ "Cannot use a invalid slot name");

These tests can be present in some sql file. I think you have kept
these in the .pl file to keep it along with other tests but I think
these are better suited for some .sql file.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Invalid primary_slot_name triggers warnings in all processes on reload
Next
From: Чумак Антон
Date:
Subject: Re: [PATCH] Introduce unified support for composite GUC options