Re: Emit fewer vacuum records by reaping removable tuples during pruning

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Emit fewer vacuum records by reaping removable tuples during pruning
Date: 2023-12-21 21:36:12
Message-ID: CAAKRu_bOLpzhYFDu5FagoaZWLDvfm6Yw=7uKo9MFRFHTpnoGUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 17, 2023 at 6:12 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> On Mon, Nov 13, 2023 at 5:28 PM Melanie Plageman
> <melanieplageman(at)gmail(dot)com> wrote:
> > When there are no indexes on the relation, we can set would-be dead
> > items LP_UNUSED and remove them during pruning. This saves us a vacuum
> > WAL record, reducing WAL volume (and time spent writing and syncing
> > WAL).
> ...
> > Note that (on principle) this patch set is on top of the bug fix I
> > proposed in [1].
> >
> > [1] https://www.postgresql.org/message-id/CAAKRu_YiL%3D44GvGnt1dpYouDSSoV7wzxVoXs8m3p311rp-TVQQ%40mail.gmail.com
>
> Rebased on top of fix in b2e237afddc56a and registered for the january fest
> https://commitfest.postgresql.org/46/4665/

I got an off-list question about whether or not this codepath is
exercised in existing regression tests. It is -- vacuum.sql tests
include those which vacuum a table with no indexes and tuples that can
be deleted.

I also looked through [1] to see if there were any user-facing docs
which happened to mention the exact implementation details of how and
when tuples are deleted by vacuum. I didn't see anything like that, so
I don't think there are user-facing docs which need updating.

- Melanie

[1] https://www.postgresql.org/docs/devel/routine-vacuuming.html

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-12-21 22:05:14 Re: pg_serial bloat
Previous Message Robert Haas 2023-12-21 21:07:57 Re: Eager page freeze criteria clarification