Re: equivalent of @@TRANCOUNT PostgreSQL

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "dave(at)davebolt(dot)co(dot)uk" <dave(at)davebolt(dot)co(dot)uk>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, "mustafa(dot)pekgoz(at)forenda(dot)com(dot)tr" <mustafa(dot)pekgoz(at)forenda(dot)com(dot)tr>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: equivalent of @@TRANCOUNT PostgreSQL
Date: 2021-05-29 14:50:24
Message-ID: 43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I don't think so, it's not current active transactions, but number of
active transactions on the CURRENT CONNECTION.  No way you get that from
pg_stat_activity.  So if your proc had a bunch of embedded BEGIN/END
blocks, it would be that count.

David G. Johnston wrote on 5/29/2021 10:44 AM:
> One transaction per process actively executing a query.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2021-05-29 14:51:04 Re: equivalent of @@TRANCOUNT PostgreSQL
Previous Message David G. Johnston 2021-05-29 14:44:57 Re: equivalent of @@TRANCOUNT PostgreSQL