Re: Testing autovacuum wraparound (including failsafe)
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-04-24T02:33:14Z
Lists: pgsql-hackers
Hi, On 2021-04-23 19:15:43 -0700, Peter Geoghegan wrote: > > The failsafe mode affects the table scan itself by disabling cost > > limiting. As far as I can see the ways it triggers for the table scan (vs > > truncation or index processing) are: > > > > 1) Before vacuuming starts, for heap phases and indexes, if already > > necessary at that point > > 2) For a table with indexes, before/after each index vacuum, if now > > necessary > > 3) On a table without indexes, every 8GB, iff there are dead tuples, if now necessary > > > > Why would we want to trigger the failsafe mode during a scan of a table > > with dead tuples and no indexes, but not on a table without dead tuples > > or with indexes but fewer than m_w_m dead tuples? That makes little > > sense to me. > > What alternative does make sense to you? Check it every so often, independent of whether there are indexes or dead tuples? Or just check it at the boundaries. I'd make it dependent on the number of pages scanned, rather than the block distance to the last check - otherwise we might end up doing it way too often when there's only a few individual pages not in the freeze map. Greetings, Andres Freund
Commits
-
Fix meson installation of xid_wraparound test.
- 1aa67a5ea687 17.0 landed
-
Add tests for XID wraparound.
- e255b646a16b 17.0 landed
-
Add option to specify timeout seconds to BackgroundPsql.pm.
- 334f512f45eb 17.0 landed
-
Fix wrong description of BackgroundPsql's timeout.
- 2d758dca1b31 16.2 landed
- 5abff2aaa1ab 17.0 landed
-
Refactor background psql TAP functions
- 664d757531e1 16.0 cited
-
Consider triggering VACUUM failsafe during scan.
- c242baa4a831 14.0 landed
-
Fix autovacuum log output heap truncation issue.
- fbe9b80610fe 14.0 landed