Summarizing indexes allowing single-phase VACUUM? - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Summarizing indexes allowing single-phase VACUUM?
Date
Msg-id CAEze2WhuLjv6Htftw-sGZ0XjBj7h=a-aJkj-eVB2PjA_ck0CbA@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

With PG16, we got Index AM -level indications for summarizing indexes,
improving HOT applicability.

Given that these indexes explicitly never store TIDs and thus don't
really need the cleanup part of vacuum's index cleanup, we could well
decide to not count those indexes to the indexes we need to clean up
in the index scan phase of vacuum, thus allowing tables with only
summarizing indexes to use the single-scan option of vacuum.

As a summarizing index may still want to do some housekeeping during
vacuum, it'd still need to get its cleanup functions called, but it'd
at least save the io and WAL of the cleanup scan.

Any comments/suggestions? POC patch attached.

Kind regards,

Matthias van de Meent
Neon (https://neon.tech)

Attachment

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: n_ins_since_vacuum stats for aborted transactions
Next
From: "David G. Johnston"
Date:
Subject: Re: n_ins_since_vacuum stats for aborted transactions