Re: Per backend relation statistics tracking - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Per backend relation statistics tracking
Date
Msg-id aLB+OLNmXCCnRg3p@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Per backend relation statistics tracking  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
Hi,

On Wed, Aug 27, 2025 at 01:57:13PM +0000, Bertrand Drouvot wrote:
> Hi,
> 
> On Tue, Aug 26, 2025 at 04:55:09PM -0500, Sami Imseih wrote:
> > I worry that a single view will grow very wide, and we will have to eventually
> > split it. So we may as well start thinking about having multiple views
> > in advance.
> 
> I gave it more thoughts and I now think that multiple views is better. We
> could start with pg_stat_backend_relations here.
> 

PFA v3, using pg_stat_backend_relation instead of pg_stat_backend.

In passing, adding PGDLLIMPORT for backend_has_relstats and PendingBackendStats
that were missing in v2.

As compared to v1, only 0001 and 0002 are shared. Let's discuss those first before
moving foward with 0003+.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Fabrice Chapuis
Date:
Subject: Re: Issue with logical replication slot during switchover
Next
From: Bertrand Drouvot
Date:
Subject: Re: Adding per backend commit and rollback counters