Re: Add sub-transaction overflow status in pg_stat_activity

From: "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add sub-transaction overflow status in pg_stat_activity
Date: 2021-12-07 23:45:51
Message-ID: 41C50CE5-0ADA-45ED-ABA0-7BCA52B62CF3@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I also want to +1 this this effort. Exposing subtransaction usage is very useful.

It would also be extremely beneficial to add both subtransaction usage and overflow counters to pg_stat_database.

Monitoring tools that capture deltas on pg_stat_database will be able to generate historical analysis and usage trends of subtransactions.

On 12/7/21, 5:34 PM, "Bossart, Nathan" <bossartn(at)amazon(dot)com> wrote:

On 12/6/21, 8:19 PM, "Dilip Kumar" <dilipbalaut(at)gmail(dot)com> wrote:
> If the subtransaction cache is overflowed in some of the transactions
> then it will affect all the concurrent queries as they need to access
> the SLRU for checking the visibility of each tuple. But currently
> there is no way to identify whether in any backend subtransaction is
> overflowed or what is the current active subtransaction count.
> Attached patch adds subtransaction count and subtransaction overflow
> status in pg_stat_activity. I have implemented this because of the
> recent complain about the same[1]

I'd like to give a general +1 to this effort. Thanks for doing this!
I've actually created a function to provide this information in the
past, so I will help review.

Nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-12-08 00:23:45 Re: logical decoding and replication of sequences
Previous Message Jacob Champion 2021-12-07 23:26:14 Re: Transparent column encryption