pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix GUC check_hook validation for synchronized_standby_slots.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix GUC check_hook validation for synchronized_standby_slots.
@ 2025-10-27 06:59 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-10-27 06:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Rahila Syed <rahilasyed90@gmail.com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/CAA5-nLCeO4MQzWipCXH58qf0arruiw0OeUc1+Q=Z=4GM+=v1NQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e0dc4bbfb88546cbbe53cfc7f8e9aca8e256adff

Modified Files
--------------
src/backend/replication/slot.c                     | 59 ++++++----------------
.../modules/unsafe_tests/expected/guc_privs.out    | 15 ++++++
src/test/modules/unsafe_tests/sql/guc_privs.sql    | 10 ++++
3 files changed, 41 insertions(+), 43 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix GUC check_hook validation for synchronized_standby_slots.
@ 2025-10-27 06:59 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-10-27 06:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Rahila Syed <rahilasyed90@gmail.com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/CAA5-nLCeO4MQzWipCXH58qf0arruiw0OeUc1+Q=Z=4GM+=v1NQ@mail.gmail.com

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b45a8d7d8b306b43f31a002f1b3f1dddc8defeaf

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix GUC check_hook validation for synchronized_standby_slots.
@ 2025-10-27 06:59 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-10-27 06:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Rahila Syed <rahilasyed90@gmail.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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-10-27 06:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-27 06:59 pgsql: Fix GUC check_hook validation for synchronized_standby_slots. Amit Kapila <akapila@postgresql.org>
2025-10-27 06:59 pgsql: Fix GUC check_hook validation for synchronized_standby_slots. Amit Kapila <akapila@postgresql.org>
2025-10-27 06:59 pgsql: Fix GUC check_hook validation for synchronized_standby_slots. Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox