Re: Use pgstat_kind_infos to read fixed shared stats structs - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Use pgstat_kind_infos to read fixed shared stats structs
Date
Msg-id ZoNytpoHOzHGBLYi@paquier.xyz
Whole thread Raw
In response to Re: Use pgstat_kind_infos to read fixed shared stats structs  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Jul 01, 2024 at 02:48:19PM +0900, Michael Paquier wrote:
> So, how about trying to remove the dependency to the fixed shared
> stats structures in PgStat_ShmemControl and PgStat_Snapshot?  I'd like
> to think that these should be replaced with an area allocated in
> shared memory and TopMemoryContext respectively, with PgStat_Snapshot
> and PgStat_ShmemControl pointing to these areas, with an allocated
> size based on the information aggregated from the KindInfo Array.  We
> could also store the offset of the fixed areas in two extra arrays,
> one for each of the two structures, indexed by KindInfo and of size
> PGSTAT_NUM_KINDS.

I have been poking at this area, and found a solution that should
work.  The details will be posted on the pluggable stats thread with a
rebased patch and these bits on top of the pluggable APIs:
https://www.postgresql.org/message-id/Zmqm9j5EO0I4W8dx%40paquier.xyz

So let's move the talking there.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Should we document how column DEFAULT expressions work?
Next
From:
Date:
Subject: RE: Improve EXPLAIN output for multicolumn B-Tree Index