Use pgstat_kind_infos to read fixed shared stats structs

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Andres Freund" <andres(at)anarazel(dot)de>
Subject: Use pgstat_kind_infos to read fixed shared stats structs
Date: 2024-05-06 19:07:53
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

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 :).

Tristan Partin
Neon (

Attachment Content-Type Size
v1-0001-Use-pgstat_kind_infos-to-read-fixed-shared-stats-.patch text/x-patch 5.1 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-05-06 19:08:40 Re: Removing unneeded self joins
Previous Message Tom Lane 2024-05-06 18:44:40 Re: On disable_cost