Re: Add pg_stat_kind_info system view

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tristan Partin <tristan@partin.io>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Date: 2026-06-24T04:12:09Z
Lists: pgsql-hackers
On Thu, Jun 18, 2026 at 04:54:36PM +0000, Tristan Partin wrote:
> On Mon Jun 8, 2026 at 12:16 AM UTC, Michael Paquier wrote:
>> On Thu, Jun 04, 2026 at 04:59:00PM +0000, Tristan Partin wrote:
>>> I believe that I also captured this correctly in v2.
>>
>> No v2 of the patch has been attached.  :D
> 
> I am not a very smart person! :facepalm:

Thanks for the patch.

A small comment that I have is related to the use of the unaligned
output of in stats.sql, where I doubt that we'll have a stats kind
named with more characters than the existing ones.  And there are a
bunch of bools, which would be easier to read if aligned.

"written_to_file" as attribute name of the SQL function is
inconsistent.  "write_to_file" would be.

The rest looks pretty much OK, seen from here.
--
Michael

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add system view pg_stat_kind_info

  2. Introduce pluggable APIs for Cumulative Statistics