Re: Revive num_dead_tuples column of pg_stat_progress_vacuum - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Revive num_dead_tuples column of pg_stat_progress_vacuum
Date
Msg-id 202406041535.pmyty3ci4pfd@alvherre.pgsql
Whole thread Raw
In response to Revive num_dead_tuples column of pg_stat_progress_vacuum  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On 2024-Jun-03, Masahiko Sawada wrote:

> Commit 667e65aac3 changed num_dead_tuples and max_dead_tuples columns
> to dead_tuple_bytes and max_dead_tuple_bytes columns, respectively.
> But at PGConf.dev, I got feedback from multiple people that
> num_dead_tuples information still can provide meaning insights for
> users to understand the vacuum progress. One use case is to compare
> num_dead_tuples to pg_stat_all_tables.n_dead_tup column.

+1.

> @@ -2887,7 +2887,9 @@ dead_items_add(LVRelState *vacrel, BlockNumber blkno, OffsetNumber *offsets,
>      TidStoreSetBlockOffsets(dead_items, blkno, offsets, num_offsets);
>      vacrel->dead_items_info->num_items += num_offsets;
>  
> -    /* update the memory usage report */
> +    /* update the progress information */
> +    pgstat_progress_update_param(PROGRESS_VACUUM_NUM_DEAD_TUPLES,
> +                                 vacrel->dead_items_info->num_items);
>      pgstat_progress_update_param(PROGRESS_VACUUM_DEAD_TUPLE_BYTES,
>                                   TidStoreMemoryUsage(dead_items));
>  }

You could use pgstat_progress_update_multi_param here.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"The important things in the world are problems with society that we don't
understand at all. The machines will become more complicated but they won't
be more complicated than the societies that run them."    (Freeman Dyson)



pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: meson "experimental"?
Next
From: "David E. Wheeler"
Date:
Subject: Patch bug: Fix jsonpath .* on Arrays