Re: Should vacuum process config file reload more often
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
John Naylor <john.naylor@enterprisedb.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-27T21:25:30Z
Lists: pgsql-hackers
> On 27 Apr 2023, at 16:53, Melanie Plageman <melanieplageman@gmail.com> wrote: > On Thu, Apr 27, 2023 at 8:55 AM Daniel Gustafsson <daniel@yesql.se> wrote: >> >>> On 27 Apr 2023, at 14:10, Masahiko Sawada <sawada.mshk@gmail.com> wrote: >>> Good catch. I think the problem is that vacuum_rel() is called >>> recursively and we don't reset VacuumFailsafeActive before vacuuming >>> the toast table. I think we should reset it in heap_vacuum_rel() >>> instead of Assert(). It's possible that we trigger the failsafe mode >>> only for either one.Please find the attached patch. >> >> Agreed, that matches my research and testing, I have the same diff here and it >> passes testing and works as intended. This was briefly discussed in [0] and >> slightly upthread from there but then missed. I will do some more looking and >> testing but I'm fairly sure this is the right fix, so unless I find something >> else I will go ahead with this. >> >> xid_wraparound is a really nifty testing tool. Very cool.Makes sense to me too. > > Fix LGTM. Thanks for review. I plan to push this in the morning. > Though we previously set it to false before this series of patches, > perhaps it is > worth adding a comment about why VacuumFailsafeActive must be reset here > even though we reset it before vacuuming each table? Agreed. -- 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