| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix GUC check_hook validation for synchronized_standby_slots. |
| Date: | 2025-10-27 06:59:44 |
| Message-ID: | E1vDHCi-003i68-0C@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix GUC check_hook validation for synchronized_standby_slots.
Previously, the check_hook for synchronized_standby_slots attempted to
validate that each specified slot existed and was physical. However, these
checks were not performed during server startup. As a result, if users
configured non-existent slots before startup, the misconfiguration would
go undetected initially. This could later cause parallel query failures,
as newly launched workers would detect the issue and raise an ERROR.
This patch improves the check_hook by validating the syntax and format of
slot names. Validation of slot existence and type is deferred to the WAL
sender process, aligning with the behavior of the check_hook for
primary_slot_name.
Reported-by: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
Author: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Reviewed-by: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/CAA5-nLCeO4MQzWipCXH58qf0arruiw0OeUc1+Q=Z=4GM+=v1NQ@mail.gmail.com
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0024f5a1022e61c6f9d5377515cc1cdee28c5939
Modified Files
--------------
src/backend/replication/slot.c | 59 ++++++----------------
.../modules/unsafe_tests/expected/guc_privs.out | 10 ++++
src/test/modules/unsafe_tests/sql/guc_privs.sql | 8 +++
3 files changed, 34 insertions(+), 43 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2025-10-27 08:02:35 | pgsql: Remove meaninglist restrict qualifiers |
| Previous Message | Amit Kapila | 2025-10-27 04:02:51 | pgsql: Improve test in 009_matviews.pl. |