public inbox for [email protected]
help / color / mirror / Atom feedFrom: Lakshmi N <[email protected]>
To: [email protected]
Subject: Add missing CHECK_FOR_INTERRUPTS in autovacuum catalog scan loops
Date: Fri, 10 Apr 2026 01:38:53 -0700
Message-ID: <CA+3i_M9+A5Wx_o3d3UHcxVU_yfes+a1b8za4VgmWTY_Odc7qMA@mail.gmail.com> (raw)
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
Attachments:
[application/octet-stream] 0001-autovacuum-cfi.patch (639B, 3-0001-autovacuum-cfi.patch)
download | inline diff:
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 82061247..90575a52 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2042,6 +2042,8 @@ do_autovacuum(void)
bool wraparound;
AutoVacuumScores scores;
+ CHECK_FOR_INTERRUPTS();
+
if (classForm->relkind != RELKIND_RELATION &&
classForm->relkind != RELKIND_MATVIEW)
continue;
@@ -2146,6 +2148,8 @@ do_autovacuum(void)
bool wraparound;
AutoVacuumScores scores;
+ CHECK_FOR_INTERRUPTS();
+
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
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]
Subject: Re: Add missing CHECK_FOR_INTERRUPTS in autovacuum catalog scan loops
In-Reply-To: <CA+3i_M9+A5Wx_o3d3UHcxVU_yfes+a1b8za4VgmWTY_Odc7qMA@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