pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix crash in parallel autovacuum when no DSM segment can be crea 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix crash in parallel autovacuum when no DSM segment can be crea @ 2026-09-28 23:28 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Masahiko Sawada @ 2026-09-28 23:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix crash in parallel autovacuum when no DSM segment can be created. If no DSM segment can be created, a ParallelContext can still be created with zero workers, but its seg pointer is NULL. Parallel autovacuum registered a segment detach callback on that NULL pointer, crashing the autovacuum worker. Fix by setting up the shared cost parameters and the detach callback only when the parallel context has workers, as there are no workers to propagate the parameters to otherwise. Oversight in commit 1ff3180ca01. Found by Bharath using AI assisted review with Claude. Reported-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://postgr.es/m/CALj2ACVjBN03Fq4XWgKH1zOfkapK6-P3ufNLHUHnZcW1zPm+Mg@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cc053b6e127763e4168f18585ca90a67600c270e Modified Files -------------- src/backend/commands/vacuumparallel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix crash in parallel autovacuum when no DSM segment can be crea @ 2026-09-28 23:28 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Masahiko Sawada @ 2026-09-28 23:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix crash in parallel autovacuum when no DSM segment can be created. If no DSM segment can be created, a ParallelContext can still be created with zero workers, but its seg pointer is NULL. Parallel autovacuum registered a segment detach callback on that NULL pointer, crashing the autovacuum worker. Fix by setting up the shared cost parameters and the detach callback only when the parallel context has workers, as there are no workers to propagate the parameters to otherwise. Oversight in commit 1ff3180ca01. Found by Bharath using AI assisted review with Claude. Reported-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://postgr.es/m/CALj2ACVjBN03Fq4XWgKH1zOfkapK6-P3ufNLHUHnZcW1zPm+Mg@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4331d20f4d5cb51663b0912fdb2a3b991bc5a5c8 Modified Files -------------- src/backend/commands/vacuumparallel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-09-28 23:28 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-28 23:28 pgsql: Fix crash in parallel autovacuum when no DSM segment can be crea Masahiko Sawada <msawada@postgresql.org> 2026-09-28 23:28 pgsql: Fix crash in parallel autovacuum when no DSM segment can be crea Masahiko Sawada <msawada@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