agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Handle invalid and dropped databases during checksum enable 2+ messages / 1 participants [nested] [flat]
* pgsql: Handle invalid and dropped databases during checksum enable @ 2026-07-28 19:58 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-07-28 19:58 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle invalid and dropped databases during checksum enable Enable errors out early with a hint when an invalid database exists, since the worker cannot connect to it and its files stay on disk. A worker that started but failed gets the same dropped-database heuristic as one that failed to start, so a concurrent drop during processing no longer aborts the whole run. The existence check locks the database first, otherwise a DROP DATABASE ... WITH (FORCE) which killed the worker is still only halfway done and the database looks like it is there to stay. Backpatch to v19 where online checksums were introduced. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CAN4CZFOGdqxtZ5-6gb4apqmvoH=Z+TNH8RKJ3mVtoR1HirKQWg@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/51f55b13a4d3621244b3645a506b006decca0ec2 Modified Files -------------- src/backend/postmaster/datachecksum_state.c | 71 +++++++++++++++ src/test/modules/test_checksums/t/001_basic.pl | 121 +++++++++++++++++++++++++ 2 files changed, 192 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Handle invalid and dropped databases during checksum enable @ 2026-07-28 19:59 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-07-28 19:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle invalid and dropped databases during checksum enable Enable errors out early with a hint when an invalid database exists, since the worker cannot connect to it and its files stay on disk. A worker that started but failed gets the same dropped-database heuristic as one that failed to start, so a concurrent drop during processing no longer aborts the whole run. The existence check locks the database first, otherwise a DROP DATABASE ... WITH (FORCE) which killed the worker is still only halfway done and the database looks like it is there to stay. Backpatch to v19 where online checksums were introduced. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CAN4CZFOGdqxtZ5-6gb4apqmvoH=Z+TNH8RKJ3mVtoR1HirKQWg@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e469e4784ea9f632b91e5d988cd336cbf54af58a Modified Files -------------- src/backend/postmaster/datachecksum_state.c | 71 +++++++++++++++ src/test/modules/test_checksums/t/001_basic.pl | 121 +++++++++++++++++++++++++ 2 files changed, 192 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-28 19:59 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-28 19:58 pgsql: Handle invalid and dropped databases during checksum enable Daniel Gustafsson <dgustafsson@postgresql.org> 2026-07-28 19:59 pgsql: Handle invalid and dropped databases during checksum enable Daniel Gustafsson <dgustafsson@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox