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

From Bertrand Drouvot
Subject Re: Per backend relation statistics tracking
Date
Msg-id aK8OuVPmmDTc9CFX@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Per backend relation statistics tracking  (Sami Imseih <samimseih@gmail.com>)
List pgsql-hackers
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.

> > Having said that, we could imagine adding
> > pg_stat_get_backend_wal() output to pg_stat_backend too.
> 
> For this one, I think we should just overload the function
> pg_stat_get_backend_wal,
> and if a PID is not passed in, return all of them; and  just create a
> new view called
> pg_stat_backend_wal that returns all the PIDs. sort of like how we have
> pg_stat_get_activity and pg_stat_activity, etc.

Yes, and it's also how the new view is designed in this patch. I think I'll
add a new pg_stat_backend_wal view if the current proposal goes in (for 
consistency).

Regards,

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



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Inconsistent update in the MERGE command
Next
From: Robert Haas
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)