Re: Should vacuum process config file reload more often
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Melanie Plageman <melanieplageman@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2023-04-17T02:04:22Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-the-condition-of-joining-autovacuum-workers-to-b.patch (application/octet-stream) patch 0001
On Wed, Apr 12, 2023 at 12:05 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Fri, Apr 7, 2023 at 10:23 PM Daniel Gustafsson <daniel@yesql.se> wrote: > > > > > On 7 Apr 2023, at 15:07, Melanie Plageman <melanieplageman@gmail.com> wrote: > > > On Fri, Apr 7, 2023 at 2:53 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > > > Definitely seems worth fixing as it kind of defeats the purpose of the > > > original commit. I wish I had noticed before! > > > > > > Your fix has: > > > !(avopts && (avopts->vacuum_cost_limit >= 0 || > > > avopts->vacuum_cost_delay >= 0)); > > > > > > And though delay is required to be >= 0 > > > avopts->vacuum_cost_delay >= 0 > > > > > > Limit does not. It can just be > 0. > > > > > > postgres=# create table foo (a int) with (autovacuum_vacuum_cost_limit = 0); > > > ERROR: value 0 out of bounds for option "autovacuum_vacuum_cost_limit" > > > DETAIL: Valid values are between "1" and "10000". > > > > > > Though >= is also fine, the rest of the code in all versions always > > > checks if limit > 0 and delay >= 0 since 0 is a valid value for delay > > > and not for limit. Probably best we keep it consistent (though the whole > > > thing is quite confusing). > > > > +1 > > +1. I misunderstood the initial value of autovacuum_vacuum_cost_limit reloption. I've attached an updated patch for fixing at_dobalance condition. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
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