From: Tristan Partin <tristan@neon.tech>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Use pgstat_kind_infos to read fixed shared stats structs
Date: Tue, 07 May 2024 14:07:42 -0500
Message-ID: <D13NCMD86NAI.2RXKZAAJB3QW8@neon.tech> (raw)
In-Reply-To: <20240507182905.xfzlajkhvpi7frab@awork3.anarazel.de>
References: <D12SQ7OYCD85.20BUVF3DWU5K7@neon.tech>
<20240507182905.xfzlajkhvpi7frab@awork3.anarazel.de>
On Tue May 7, 2024 at 1:29 PM CDT, Andres Freund wrote:
> Hi,
>
> On 2024-05-06 14:07:53 -0500, Tristan Partin wrote:
> > Instead of needing to be explicit, we can just iterate the
> > pgstat_kind_infos array to find the memory locations to read into.
>
> > This was originally thought of by Andres in
> > 5891c7a8ed8f2d3d577e7eea34dacff12d7b6bbd.
> >
> > Not a fix, per se, but it does remove a comment. Perhaps the discussion will
> > just lead to someone deleting the comment, and keeping the code as is.
> > Either way, a win :).
>
> 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.
> 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
--
Tristan Partin
Neon (https://neon.tech)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tristan@neon.tech, andres@anarazel.de
Subject: Re: Use pgstat_kind_infos to read fixed shared stats structs
In-Reply-To: <D13NCMD86NAI.2RXKZAAJB3QW8@neon.tech>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox