Re: Use pgstat_kind_infos to read fixed shared stats structs

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

On Mon May 6, 2024 at 9:50 PM CDT, Michael Paquier wrote:
> On Mon, May 06, 2024 at 02:07:53PM -0500, Tristan Partin wrote:
> > This was originally thought of by Andres in
> > 5891c7a8ed8f2d3d577e7eea34dacff12d7b6bbd.
>
> +1 because you are removing a duplication between the order of the
> items in PgStat_Kind and the order when these are read. I suspect
> that nobody would mess up with the order if adding a stats kind with a
> fixed number of objects, but that makes maintenance slightly easier in
> the long-term :)
>
> > 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 :).
>
> Yup. Let's leave that as something to do for v18.

Thanks for the feedback Michael. Should I just throw the patch in the
next commitfest so it doesn't get left behind?

--
Tristan Partin
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2024-05-07 05:46:12 Re: Revert: Remove useless self-joins *and* -DREALLOCATE_BITMAPSETS make server crash, regress test fail.
Previous Message Tom Lane 2024-05-07 05:28:55 Re: Revert: Remove useless self-joins *and* -DREALLOCATE_BITMAPSETS make server crash, regress test fail.