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
signature.asc
Description: PGP signature