Re: Should vacuum process config file reload more often
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>,
Andres Freund <andres@anarazel.de>,
Tom Lane <tgl@sss.pgh.pa.us>,
Masahiko Sawada <sawada.mshk@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Amit Kapila <amit.kapila16@gmail.com>
Date: 2023-04-06T18:55:02Z
Lists: pgsql-hackers
> On 6 Apr 2023, at 19:18, Robert Haas <robertmhaas@gmail.com> wrote: > > On Thu, Apr 6, 2023 at 11:52 AM Melanie Plageman > <melanieplageman@gmail.com> wrote: >>> Gah, I think I misunderstood you. You are saying that only calling >>> AutoVacuumUpdateCostLimit() after napping while vacuuming a table may >>> not be enough. The frequency at which the number of workers changes will >>> likely be different. This is a good point. >>> It's kind of weird to call AutoVacuumUpdateCostLimit() only after napping... >> >> A not fully baked idea for a solution: >> >> Why not keep the balanced limit in the atomic instead of the number of >> workers for balance. If we expect all of the workers to have the same >> value for cost limit, then why would we just count the workers and not >> also do the division and store that in the atomic variable. We are >> worried about the division not being done often enough, not the number >> of workers being out of date. This solves that, right? > > A bird in the hand is worth two in the bush, though. We don't really > have time to redesign the patch before feature freeze, and I can't > convince myself that there's a big enough problem with what you > already did that it would be worth putting off fixing this for another > year. +1, I'd rather see we did a conservative version of the feature first and expand upon it in the 17 cycle. > Reading your newer emails, I think that the answer to my > original question is "we don't want to do it at every > vacuum_delay_point because it might be too costly," which is > reasonable. I think we kind of need to get to that granularity eventually, but it's not a showstopper for this feature, and can probably benefit from being done in the context of a larger av-worker re-think (the importance of which discussed downthread). -- Daniel Gustafsson
Commits
-
Fix assertion failure in heap_vacuum_rel
- 4a6603cd4650 16.0 landed
-
Fix vacuum_cost_delay check for balance calculation.
- cba3c8f6dd7f 12.15 landed
- bfac8f8bc4a4 16.0 landed
- b95f36f86131 13.11 landed
- 0e8e5e856cc3 14.8 landed
- 0319b306e87e 15.3 landed
- 0151d2c5f256 11.20 landed
-
Fix autovacuum cost debug logging
- a9781ae11ba2 16.0 landed
-
Refresh cost-based delay params more frequently in autovacuum
- 7d71d3dd080b 16.0 landed
-
Separate vacuum cost variables from GUCs
- a85c60a945ac 16.0 landed
-
Make vacuum failsafe_active globally visible
- 71a825194fd3 16.0 landed
-
Don't balance vacuum cost delay when per-table settings are in effect
- 1021bd6a89bc 9.5.0 cited