Re: Add connection active, idle time to pg_stat_activity
torikoshia <torikoshia@oss.nttdata.com>
From: torikoshia <torikoshia@oss.nttdata.com>
To: Sergey Dudoladov <sergey.dudoladov@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "Drouvot,
Bertrand" <bdrouvot@amazon.com>, Andres Freund <andres@anarazel.de>, Julien
Rouhaud <rjuju123@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Kuntal Ghosh <kuntalghosh.2007@gmail.com>, Rafia Sabih
<rafia.pghackers@gmail.com>
Date: 2022-07-14T03:15:24Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove unstable pg_amcheck tests.
- cd3f429d9565 15.0 cited
Rafia, Sergey, +1 for adding the total_active_time and total_idle_in_transaction_time to pg_stat_activity. I reviewed the patch and here are some comments. + <entry role="catalog_table_entry"><para role="column_definition"> + <structfield>total_active_time</structfield> <type>double precision</type> + </para> + <para> + Time in milliseconds this backend spent in <literal>active</literal> and + <literal>fastpath</literal> states. Is 'fastpath' an abbreviation of 'fastpath function call'? If so, I feel it's clearer '<literal>fastpath function call</literal>' than '<literal>fastpath</literal>'. +extern uint64 pgstat_get_my_active_time(void); +extern uint64 pgstat_get_my_transaction_idle_time(void); Are these functions necessary? It seems they are not called from anywhere, doesn't it? -- Regards, -- Atsushi Torikoshi NTT DATA CORPORATION