Re: Split index and table statistics into different types of stats

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, "Gregory Stark (as CFM)" <stark(dot)cfm(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, vignesh C <vignesh21(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Split index and table statistics into different types of stats
Date: 2024-01-25 08:36:17
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On Tue, Nov 14, 2023 at 09:04:03AM +0100, Drouvot, Bertrand wrote:
> On 11/13/23 9:44 PM, Andres Freund wrote:
> > Hi,
> >
> > It's not nice from a layering POV that we need this level of awareness in
> > bufmgr.c. I wonder if this is an argument for first splitting out stats like
> > blocks_hit, blocks_fetched into something like "relfilenode stats" - they're
> > agnostic of the relkind.
> Thanks for looking at it! Yeah I think that would make a lot of sense
> to track some stats per relfilenode.
> > There aren't that many such stats right now,
> > admittedly, but I think we'll want to also track dirtied, written blocks on a
> > per relation basis once we can (i.e. we key the relevant stats by relfilenode
> > instead of oid, so we can associate stats when writing out buffers).
> >
> >
> Agree. Then, I think that would make sense to start this effort before the
> split index/table one. I can work on a per relfilenode stat patch first.
> Does this patch ordering make sense to you?
> 1) Introduce per relfilenode stats
> 2) Split index and table stats

Just a quick update on this: I had a chat with Andres at and we agreed
on the above ordering so that:

1) I started working on relfilenode stats (I hope to be able to provide a POC
patch soon).

2) The CF entry [1] status related to this thread has been changed to "Waiting
on Author".



Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services:

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sutou Kouhei 2024-01-25 08:45:43 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Andrew Bille 2024-01-25 08:21:35 Re: cataloguing NOT NULL constraints