On Thu, 26 Mar 2026 08:26:26 +0900
Michael Paquier <[email protected]> wrote:

> On Wed, Mar 25, 2026 at 12:12:35PM -0500, Sami Imseih wrote:
> > I'm fine with adding timestamps, as there seem to be convincing
> > reasons to add them.
> > My other concern is bloat of the pg_stat_all_tables view. This patch
> > adds 4 columns, or
> > 8 if we also include manual vacuum and analyze (which I think we should).
> > 
> > Given that, should we also start thinking about splitting the vacuum
> > activity related
> > columns into a dedicated view and out of pg_stat_all_tables for v20?
> 
> PgStat_StatTabEntry is shared between indexes and tables.  A bunch of
> its fields apply only to tables, not indexes (aka all the vacuum and
> analyze ones).  Few fields apply only to indexes, not tables.  Not
> that many are shared between both.  I would advocate for a clean split
> between indexes and tables, as a start, with a new variable-sized
> stats kind dedicated to indexes.

I see that the following fields are used in pg_stat_all_indexes:

- numscans
- lastscan
- tuples_returned
- tuples_fetched
- stat_reset_time

but they are also shared with pg_stat_all_tables. Are you suggesting
splitting these shared fields from those that are specific to tables?

I'm not sure this would significantly reduce the size of
PgStat_StatTabEntry. Could you elaborate on the expected benefits?

Regards,
Yugo Nagata

-- 
Yugo Nagata <[email protected]>


Reply via email to