pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix parallel autovacuum workers ignoring track_cost_delay_timing
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix parallel autovacuum workers ignoring track_cost_delay_timing
@ 2026-10-05 23:17  Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-10-05 23:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix parallel autovacuum workers ignoring track_cost_delay_timing changes.

Commit 1ff3180ca01 made the leader of a parallel autovacuum propagate
changes to the cost-based delay parameters to its workers, but missed
track_cost_delay_timing. Workers therefore kept the value they had at
launch: turning the parameter on during the vacuum left
pg_stat_progress_vacuum.delay_time counting only the leader's naps,
and turning it off didn't stop workers from adding theirs. Throttling
itself was not affected.

Fix by adding track_cost_delay_timing to PVSharedCostParams. Since a
worker's setting can now change while it runs, we report its residual
delay time at exit whenever any has been accumulated, rather than only
if track_cost_delay_timing is still on.

Backpatch to v19, where parallel autovacuum was introduced.

Reported-by: Sami Imseih <samimseih.pg@gmail.com>
Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/CAN12+YJZaALd3zMeKVVRTwcuY5_yDtR_vMPwWc8QNgeYxrn4Zg@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/92a734bf5c7ace23131b711025c75aacd8144482

Modified Files
--------------
src/backend/commands/vacuumparallel.c                       | 13 +++++++++----
.../modules/test_autovacuum/t/001_parallel_autovacuum.pl    |  3 ++-
2 files changed, 11 insertions(+), 5 deletions(-)



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

* pgsql: Fix parallel autovacuum workers ignoring track_cost_delay_timing
@ 2026-10-05 23:17  Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-10-05 23:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix parallel autovacuum workers ignoring track_cost_delay_timing changes.

Commit 1ff3180ca01 made the leader of a parallel autovacuum propagate
changes to the cost-based delay parameters to its workers, but missed
track_cost_delay_timing. Workers therefore kept the value they had at
launch: turning the parameter on during the vacuum left
pg_stat_progress_vacuum.delay_time counting only the leader's naps,
and turning it off didn't stop workers from adding theirs. Throttling
itself was not affected.

Fix by adding track_cost_delay_timing to PVSharedCostParams. Since a
worker's setting can now change while it runs, we report its residual
delay time at exit whenever any has been accumulated, rather than only
if track_cost_delay_timing is still on.

Backpatch to v19, where parallel autovacuum was introduced.

Reported-by: Sami Imseih <samimseih.pg@gmail.com>
Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/CAN12+YJZaALd3zMeKVVRTwcuY5_yDtR_vMPwWc8QNgeYxrn4Zg@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

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

Modified Files
--------------
src/backend/commands/vacuumparallel.c                       | 13 +++++++++----
.../modules/test_autovacuum/t/001_parallel_autovacuum.pl    |  3 ++-
2 files changed, 11 insertions(+), 5 deletions(-)



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


end of thread, other threads:[~2026-10-05 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 23:17 pgsql: Fix parallel autovacuum workers ignoring track_cost_delay_timing Masahiko Sawada <msawada@postgresql.org>
2026-10-05 23:17 pgsql: Fix parallel autovacuum workers ignoring track_cost_delay_timing 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