Prevent pg_enable/disable_data_checksums() on standby
Daniel Gustafsson <dgustafsson@postgresql.org>
Author:
Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2026-04-30T11:41:41Z
Releases:
19 (unreleased)
Prevent pg_enable/disable_data_checksums() on standby These functions missed a RecoveryInProgress() check, allowing them to be called on a hot standby. Enabling, or disabling, checksums on the standby only would cause the cluster to get out of sync and replaying checksum transitions to fail. Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com> Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CAHg+QDfRk4-S7DMmdbXJnQ-xF=sUpMAKuh8b83ObLqYVKx5QLA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/datachecksum_state.c | modified | +4 −0 |
Discussion
- Changing the state of data checksums in a running cluster 144 messages · 2024-07-03 → 2026-07-02