pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: dave@davebolt.co.uk <dave@davebolt.co.uk>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: mustafa.pekgoz@forenda.com.tr <mustafa.pekgoz@forenda.com.tr>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: equivalent of @@TRANCOUNT PostgreSQL
Date: Sat, 29 May 2021 10:50:24 -0400
Message-ID: <43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com> (raw)
In-Reply-To: <CAKFQuwZZDB5bSYK+MzEvbdGCCSeLrG+eC5UC4NraVLmw=iEkaQ@mail.gmail.com>
References: <004101d7548b$894e0ce0$9bea26a0$@forenda.com.tr>
	<CAOBaU_bwoQ8Hos1rrMHmGyzA5TfP0oJ0J3tHGYabod_Pe6YwHw@mail.gmail.com>
	<042901d75497$c2da72d0$488f5870$@co.uk>
	<CAKFQuwZZDB5bSYK+MzEvbdGCCSeLrG+eC5UC4NraVLmw=iEkaQ@mail.gmail.com>

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.

view thread (11+ messages)  latest in thread

Message-ID: <43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com>
Permalink:  ../43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com/
Also on:    postgresql.org/message-id/43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: MichaelDBA@sqlexec.com, david.g.johnston@gmail.com, dave@davebolt.co.uk, rjuju123@gmail.com, mustafa.pekgoz@forenda.com.tr, pgsql-admin@lists.postgresql.org
  Subject: Re: equivalent of @@TRANCOUNT PostgreSQL
  In-Reply-To: <43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox