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

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

On Tue, Jan 9, 2024 at 3:13 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
> I had already written the patch for immediate reaping addressing the
> below feedback before I saw the emails that said everyone is happy
> with using hastup in lazy_scan_[no]prune() in a preliminary patch. Let
> me know if you have a strong preference for reordering. Otherwise, I
> will write the three subsequent patches on top of this one.

I don't know if it rises to the level of a strong preference. It's
just a preference.

> Ah, I like this a lot. Attached patch does this. I've added a modified
> version of the comment you suggested. My only question is if we are
> losing something without this sentence (from the old comment):
>
> - * ... They don't need to be left in place as LP_DEAD items
> until VACUUM gets
> - * around to doing index vacuuming.
>
> I don't feel like it adds a lot, but it is absent from the new
> comment, so thought I would check.

I agree that we can leave that out. It wouldn't be bad to include it
if someone had a nice way of doing that, but it doesn't seem critical,
and if forcing it in there makes the comment less clear overall, it's
a net loss IMHO.

> Hmm. Yes. I suppose I was trying to find something to validate. Is it
> worth checking that the line pointer is not already LP_UNUSED? Or is
> that a bit ridiculous?

I think that's worthwhile (hence my proposed wording).

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-01-09 20:49:38 Re: Add BF member koel-like indentation checks to SanityCheck CI
Previous Message Robert Haas 2024-01-09 20:31:39 Re: index prefetching