Re: Use pgstat_kind_infos to read fixed shared stats structs

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tristan Partin <tristan(at)neon(dot)tech>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use pgstat_kind_infos to read fixed shared stats structs
Date: 2024-05-08 01:21:56
Message-ID: ZjrTtJgJdaCaDBjm@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 07, 2024 at 02:07:42PM -0500, Tristan Partin wrote:
> On Tue May 7, 2024 at 1:29 PM CDT, Andres Freund wrote:
>> I think it's a good idea. I'd really like to allow extensions to register new
>> types of stats eventually. Stuff like pg_stat_statements having its own,
>> fairly ... mediocre, stats storage shouldn't be necessary.
>
> Could be useful for Neon in the future too.

Interesting thing to consider. If you do that, I'm wondering if you
could, actually, lift the restriction on pg_stat_statements.max and
make it a SIGHUP so as it could be increased on-the-fly.. Hmm, just a
thought in passing.

>> Do we need to increase the stats version, I didn't check if the order we
>> currently store things in and the numerical order of the stats IDs are the
>> same.
>
> I checked the orders, and they looked the same.
>
> 1. Archiver
> 2. BgWriter
> 3. Checkpointer
> 4. IO
> 5. SLRU
> 6. WAL

Yup, I've looked at that yesterday and the read order remains the same
so I don't see a need for a version bump.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-05-08 02:01:01 Re: pg_sequence_last_value() for unlogged sequences on standbys
Previous Message Thomas Munro 2024-05-08 01:13:21 Re: backend stuck in DataFileExtend