Re: Should vacuum process config file reload more often

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Should vacuum process config file reload more often
Date: 2023-04-27 21:25:30
Message-ID: 7A5D2190-5BF3-45F6-AE54-471D23C0CF1B@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 27 Apr 2023, at 16:53, Melanie Plageman <melanieplageman(at)gmail(dot)com> wrote:
> On Thu, Apr 27, 2023 at 8:55 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 27 Apr 2023, at 14:10, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2023-04-27 21:30:40 Re: pg_stat_io for the startup process
Previous Message Tom Lane 2023-04-27 19:34:55 Re: Possible regression setting GUCs on \connect