agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Do not reuse rd_smgr in fork loop when enabling data checksums 2+ messages / 1 participants [nested] [flat]
* pgsql: Do not reuse rd_smgr in fork loop when enabling data checksums @ 2026-08-04 10:21 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-08-04 10:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Do not reuse rd_smgr in fork loop when enabling data checksums ProcessSingleRelationByOid called RelationGetSmgr(rel), discarded the result, and then read rel->rd_smgr directly when looping over forks. Only RelationGetSmgr is authorized to read that field since a relcache invalidation resets rd_smgr to NULL. Backpatch to v19 where online checksums were introduced. Author: Mihail Nikalayeu <mihailnikalayeu@gmail.com> Reviewed-by: ChangAo Chen <cca5507@qq.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CADzfLwXGvb4Y-mqy8T+O0f_tkXR1sTDBGzP5Z=V_qcGnZ46rWg@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ab918a4fab0a6a8855b230d140bbf89fb090ad3e Modified Files -------------- src/backend/postmaster/datachecksum_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Do not reuse rd_smgr in fork loop when enabling data checksums @ 2026-08-04 10:21 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-08-04 10:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Do not reuse rd_smgr in fork loop when enabling data checksums ProcessSingleRelationByOid called RelationGetSmgr(rel), discarded the result, and then read rel->rd_smgr directly when looping over forks. Only RelationGetSmgr is authorized to read that field since a relcache invalidation resets rd_smgr to NULL. Backpatch to v19 where online checksums were introduced. Author: Mihail Nikalayeu <mihailnikalayeu@gmail.com> Reviewed-by: ChangAo Chen <cca5507@qq.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CADzfLwXGvb4Y-mqy8T+O0f_tkXR1sTDBGzP5Z=V_qcGnZ46rWg@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/01805b7d16b9a06d5223071215db0337bc8e6d92 Modified Files -------------- src/backend/postmaster/datachecksum_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-08-04 10:21 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-08-04 10:21 pgsql: Do not reuse rd_smgr in fork loop when enabling data checksums Daniel Gustafsson <dgustafsson@postgresql.org> 2026-08-04 10:21 pgsql: Do not reuse rd_smgr in fork loop when enabling data checksums 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