Re: Testing autovacuum wraparound (including failsafe)
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-05-18T07:09:37Z
Lists: pgsql-hackers
On Tue, May 18, 2021 at 2:46 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Tue, May 18, 2021 at 2:42 PM Peter Geoghegan <pg@bowt.ie> wrote:
> >
> > On Mon, May 17, 2021 at 10:29 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > > +1 to fix this. Are you already working on fixing this? If not, I'll
> > > post a patch.
> >
> > I posted a patch recently (last Thursday my time). Perhaps you can review it?
>
> Oh, I missed that the patch includes that fix. I'll review the patch.
>
I've reviewed the patch. Here is one comment:
if (vacrel->num_index_scans == 0 &&
- vacrel->rel_pages <= FAILSAFE_MIN_PAGES)
+ vacrel->rel_pages <= FAILSAFE_EVERY_PAGES)
return false;
Since there is the condition "vacrel->num_index_scans == 0" we could
enter the failsafe mode even if the table is less than 4GB, if we
enter lazy_check_wraparound_failsafe() after executing more than one
index scan. Whereas a vacuum on the table that is less than 4GB and
has no index never enters the failsafe mode. I think we can remove
this condition since I don't see the reason why we don't allow to
enter the failsafe mode only when the first-time index scan in the
case of such tables. What do you think?
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
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