Re: Add pg_stat_kind_info system view

From: solai v <solai(dot)cdac(at)gmail(dot)com>
To: Tristan Partin <tristan(at)partin(dot)io>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Subject: Re: Add pg_stat_kind_info system view
Date: 2026-06-11 06:35:01
Message-ID: CAF0whudPq0TKnVgPC7YCv_+ysx9RU6MmRqshJrfzCUDPyck_oQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

On Wed, Jun 10, 2026 at 3:34 PM Tristan Partin <tristan(at)partin(dot)io> wrote:
>
> Of course I forgot to attach the patch :D.
>
> --

I reviewed the v1 patch and had verified that both the view and the
function are created successfully and return identical results. The
builtin statistics kinds are exposed correctly, and the IDs and names
are unique without any duplicates. The count column behaves as
expected, returning NULL for statistics kinds that do not support
entry count tracking and 1 for fixed statistics kinds. While reviewing
the patch, I found it may be useful to expose a boolean column such as
track_entry_count in pg_stat_kind_info that would explicitly indicate
whether entry count tracking is enabled for a statistics kind and also
would help users understand why the count column is NULL for certain
statistics kinds. Exposing this internal property would make the view
more self-explanatory and improve its usefulness for debugging. Apart
from these suggestions, I did not find any issues with the current
implementation.
Looking forward to more feedback.

Regards,
Solai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2026-06-11 06:35:32 Re: [BUG] Take a long time to reach consistent after pg_rewind
Previous Message Dilip Kumar 2026-06-11 05:13:51 Re: Proposal: Conflict log history table for Logical Replication