Re: issue with synchronized_standby_slots
Shlok Kyal <shlok.kyal.oss@gmail.com>
From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Alexander Kukushkin <cyberdemn@gmail.com>, Fabrice Chapuis <fabrice636861@gmail.com>,
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-10T11:34:18Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix GUC check_hook validation for synchronized_standby_slots.
- e0dc4bbfb885 19 (unreleased) landed
- b45a8d7d8b30 18.1 landed
- 0024f5a1022e 17.7 landed
-
Make invalid primary_slot_name follow standard GUC error reporting.
- f33e60a53a9c 19 (unreleased) cited
Attachments
- v2-0001-Remove-the-validation-from-the-GUC-check-hook-and.patch (application/octet-stream) patch v2-0001
On Wed, 10 Sept 2025 at 15:33, Rahila Syed <rahilasyed90@gmail.com> wrote:
>
> Hi,
>
>
>> As for the synchronized_standby_slots, we can follow the behavior
>> similar to check_synchronous_standby_names and just give parsing
>> ERRORs. Any non-existent slot related errors can be given when that
>> parameter is later used.
>>
>> --
>
>
> Please find attached a patch that implements this. I will work on adding a test for it.
>
Hi Rahila,
I think we should also add a parsing check for slot names specified in
the GUC synchronize_standby_slots as suggested by Amit in [1].
I think we should also update the comment message in function
StandbySlotsHaveCaughtup
/*
* If a slot name provided in synchronized_standby_slots does not
* exist, report a message and exit the loop.
*
* Though validate_sync_standby_slots (the GUC check_hook) tries to
* avoid this, it can nonetheless happen because the user can specify
* a nonexistent slot name before server startup. That function cannot
* validate such a slot during startup, as ReplicationSlotCtl is not
* initialized by then. Also, the user might have dropped one slot.
*/
I made the changes in the above for the same and attached the updated patch.
[1]: https://www.postgresql.org/message-id/CAA4eK1Jprqfs_URBmZ5%3DOOL98D05rPiGup1sscWgcCGcWU%3D9iA%40mail.gmail.com
Thanks,
Shlok Kyal