public inbox for [email protected]  
help / color / mirror / Atom feed
From: Masahiko Sawada <[email protected]>
To: Peter Geoghegan <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Testing autovacuum wraparound (including failsafe)
Date: Tue, 18 May 2021 16:09:37 +0900
Message-ID: <CAD21AoDMFFVfEiRjLO1KH9Kh07yGh7DUuEKd2ZmPXaFm1mViTw@mail.gmail.com> (raw)
In-Reply-To: <CAD21AoCtjbzAbaYXcvBP2dO=or_weQms0+vZJFbmMPz6PaBAcg@mail.gmail.com>
References: <[email protected]>
	<CAH2-Wz=f2dfc-0BcM5X5ttXTeRNPg+JtxEMCuSZR82a7XHfRkg@mail.gmail.com>
	<[email protected]>
	<CAH2-WzkDM7nC+j2b3kB-2w4YkjXmrT+i0ppEcCNwTkpRehKLyQ@mail.gmail.com>
	<CAD21AoBhZrV7zoMGNZJm0h16Zw+UN=+EpWKBOu90zHm3pA4WVw@mail.gmail.com>
	<CAH2-Wz=3UyssRDzcsm-RTApDe_ZPxbb_7MXS37qatXOvw5CH+g@mail.gmail.com>
	<CAD21AoCtjbzAbaYXcvBP2dO=or_weQms0+vZJFbmMPz6PaBAcg@mail.gmail.com>

On Tue, May 18, 2021 at 2:46 PM Masahiko Sawada <[email protected]> wrote:
>
> On Tue, May 18, 2021 at 2:42 PM Peter Geoghegan <[email protected]> wrote:
> >
> > On Mon, May 17, 2021 at 10:29 PM Masahiko Sawada <[email protected]> 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/





view thread (20+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Testing autovacuum wraparound (including failsafe)
  In-Reply-To: <CAD21AoDMFFVfEiRjLO1KH9Kh07yGh7DUuEKd2ZmPXaFm1mViTw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox