Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ln0TT-0008WF-MS for pgsql-admin@arkaria.postgresql.org; Sat, 29 May 2021 15:02:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ln0TS-0005jW-3c for pgsql-admin@arkaria.postgresql.org; Sat, 29 May 2021 15:02:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ln0TR-0005iw-RH for pgsql-admin@lists.postgresql.org; Sat, 29 May 2021 15:02:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ln0TP-0002sd-UO for pgsql-admin@lists.postgresql.org; Sat, 29 May 2021 15:02:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14TF1Ap12045694; Sat, 29 May 2021 11:01:10 -0400 From: Tom Lane To: MichaelDBA cc: "David G. Johnston" , "dave@davebolt.co.uk" , Julien Rouhaud , "mustafa.pekgoz@forenda.com.tr" , Pgsql-admin Subject: Re: equivalent of @@TRANCOUNT PostgreSQL In-reply-to: <43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com> References: <004101d7548b$894e0ce0$9bea26a0$@forenda.com.tr> <042901d75497$c2da72d0$488f5870$@co.uk> <43af0a07-99df-6125-4227-ce1c22bd1fb8@sqlexec.com> Comments: In-reply-to MichaelDBA message dated "Sat, 29 May 2021 10:50:24 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2045692.1622300470.1@sss.pgh.pa.us> Date: Sat, 29 May 2021 11:01:10 -0400 Message-ID: <2045693.1622300470@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk MichaelDBA writes: > I don't think so, it's not current active transactions, but number of > active transactions on the CURRENT CONNECTION. Isn't that a constant 1? We don't do multiple active transactions in one session. regards, tom lane