public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dapeng Wang <[email protected]>
To: Lakshmi N <[email protected]>
Cc: [email protected]
Subject: Re: Add missing CHECK_FOR_INTERRUPTS in autovacuum catalog scan loops
Date: Sat, 11 Apr 2026 20:19:55 +0800
Message-ID: <CAKx0Yhzmn=gdfsv7iZDZ1cjXqRLq0amUmESL83qjyxnFDqYVJQ@mail.gmail.com> (raw)
In-Reply-To: <CA+3i_M_Jwy2T+L+wT_4yXKG8r1yQFJt3+Gm5wbxap5hKyy_nzA@mail.gmail.com>
References: <CA+3i_M9+A5Wx_o3d3UHcxVU_yfes+a1b8za4VgmWTY_Odc7qMA@mail.gmail.com>
	<CAKx0YhxRYuWCSC3mCTJ0VRn0iM8v0G=7vku=3Wg7pyi+rN-=Jw@mail.gmail.com>
	<CA+3i_M_Jwy2T+L+wT_4yXKG8r1yQFJt3+Gm5wbxap5hKyy_nzA@mail.gmail.com>

Lakshmi N <[email protected]> 于2026年4月11日周六 13:02写道:

> Hi,
>
> On Fri, Apr 10, 2026 at 4:57 AM Dapeng Wang <[email protected]>
> wrote:
>
>> Lakshmi N <[email protected]> 于2026年4月10日周五 16:39写道:
>>
>>> Hi hackers,
>>>
>>> I noticed CFI is missing while scanning pg_class for RELKIND_RELATION
>>> and RELKIND_TOASTVALUE. On a database with several thousands of tables,
>>> these scans can take a noticeable amount of time. Attached a patch to
>>> address this.
>>>
>>> Regards,
>>> Lakshmi
>>>
>> Hi Lakshmi,
>>
>> The patch applies cleanly to HEAD and compiles without warnings.
>> make check passes (one unrelated ICU collation diff).
>>
>> The two CHECK_FOR_INTERRUPTS() additions in do_autovacuum() look
>> correct and are well-placed at the top of each loop iteration,
>> before any resources are acquired.
>>
>> I noticed there are other similar catalog scan loops in
>> autovacuum.c that also lack CHECK_FOR_INTERRUPTS():
>>
>> - The pg_database scan loop around line 1854
>> - The pg_class scan loop around line 3664
>>
>> Should those be covered as well?
>>
>
> Updated the patch covering those two as well.
>
>
> Regards,
> Lakshmi
>


Hi Lakshmi,

The updated patch now covers all four catalog scan loops.
Applies cleanly, compiles without warnings, and all 247
regression tests pass.

Regards,
Dapeng Wang


view thread (5+ 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: Add missing CHECK_FOR_INTERRUPTS in autovacuum catalog scan loops
  In-Reply-To: <CAKx0Yhzmn=gdfsv7iZDZ1cjXqRLq0amUmESL83qjyxnFDqYVJQ@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