Subject: Re: Revive num_dead_tuples column of pg_stat_progress_vacuum

From: Peter Geoghegan <[email-masked]>
Date: Mon, 3 Jun 2024 17:49:45 -0400

On Mon, Jun 3, 2024 at 5:27 PM Masahiko Sawada <[email-masked]> wrote:
> I've attached the patch to revive num_dead_tuples column back to the
> pg_stat_progress_vacuum view. This requires to bump catalog version.
> We're post-beta1 but it should be okay as it's only for PG17.
>
> Feedback is very welcome.

Can we rename this to num_dead_item_ids (or something similar) in
passing? That way we'll avoid confusing the number of dead tuples
removed from the table by VACUUM (which includes dead heap-only
tuples, but excludes any preexisting LP_DEAD items left behind by
opportunistic pruning) with the number of dead item identifiers.

As you know, TIDStore stores TIDs that refer to dead item identifiers
in the heap, which is often very different to the number of dead
tuples removed by VACUUM. The VACUUM log output has reported on dead
item identifiers separately since 14. This seems like a good
opportunity to bring pg_stat_progress_vacuum in line.

-- 
Peter Geoghegan