Re: Adjust pg_stat_get_lock() prorows to match lock types - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Adjust pg_stat_get_lock() prorows to match lock types
Date
Msg-id aiZW5peZFBdQYq6o@paquier.xyz
Whole thread
List pgsql-hackers
On Mon, Jun 08, 2026 at 02:20:00PM +0900, Kyotaro Horiguchi wrote:
> At Mon, 4 May 2026 10:23:47 +0800, Chao Li <li.evan.chao@gmail.com> wrote in
>> I read the code of pg_stat_lock() and played a bit with it. I happened =
>> to notice one thing: the function always returns 12 rows, but the =
>> planner estimates 10 rows:
>
> I'm not convinced this needs to be adjusted.

Neither am I.  An estimate does not have to match the exact reality,
especially when it comes to these system functions.  Just one example
from pg_proc.dat: pg_stat_get_io() has a prorows of 30, returns 95
rows.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Use correct type for catalog_xmin
Next
From: Michael Paquier
Date:
Subject: Re: bugfix - fix broken output in expanded aligned format, when data are too short