Re: PG17 optimizations to vacuum

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: PG17 optimizations to vacuum
Date: 2024-09-02 20:58:49
Message-ID: CAH2-Wz=dYGM1=ONVYd2jUdZP8bQy0t8G9o6PpoRWGbvbN-uPBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 2, 2024 at 4:35 PM Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> wrote:
> If it helps, without creating index on id column, the numbers will be
> much closer:

Yes, avoiding all index vacuuming seems useful. It makes the test case
cleaner, since we don't have to think about the variability from the
TIDStore work (and from index vacuuming more generally).

> master:
> WAL usage: 78502 records, 22090 full page images, 196215494 bytes
>
> v15:
> WAL usage: 77437 records, 30872 full page images, 152080268 bytes

To be clear, I wouldn't be all that surprised if some issue with
alignment padding and/or the new WAL format made master write more
bytes of WAL total than on earlier versions. Small inefficiencies like
that were always a possibility. That's not the problem that I'm
principally concerned about right now.

I'm most concerned about the simple fact that we're writing more
individual WAL records than on previous versions, despite the fact
that VACUUM does exactly the same amount of useful pruning and
freezing work across versions. How could a patch that merged together
the previous PRUNE and VACUUM WAL record types into a single record
type actually cause an increase in the number of WAL records written?
I'd have thought that that was simply impossible.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2024-09-02 21:01:54 Re: PG17 optimizations to vacuum
Previous Message Heikki Linnakangas 2024-09-02 20:58:25 Re: PG17 optimizations to vacuum