Re: Add sub-transaction overflow status in pg_stat_activity

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(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-13 22:27:09
Message-ID: C21036F3-CA22-4CA4-AA9F-099C75F082FC@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/13/21, 6:30 AM, "Dilip Kumar" <dilipbalaut(at)gmail(dot)com> wrote:
> On Tue, Dec 7, 2021 at 11:11 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>> Since I think this field is usually not interesting to most users of
>> pg_stat_activity, maybe this should instead be implemented as a function like
>> pg_backend_get_subxact_status(pid).
>>
>> People who want to could use it like:
>> SELECT * FROM pg_stat_activity psa, pg_backend_get_subxact_status(pid) sub;
>
> I have provided two function, one for subtransaction counts and other
> whether subtransaction cache is overflowed or not, we can use like
> this, if we think this is better way to do it then we can also add
> another function for the lastOverflowedXid

The general approach looks good to me. I think we could have just one
function for all three values, though.

Nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2021-12-13 22:27:52 Re: make tuplestore helper function
Previous Message Thomas Munro 2021-12-13 22:18:58 Re: Add client connection check during the execution of the query