Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wqb4l-002Iv8-2E for pgpool-general@arkaria.postgresql.org; Sun, 02 Aug 2026 18:38:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wqb4i-003EFW-1y for pgpool-general@arkaria.postgresql.org; Sun, 02 Aug 2026 18:38:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wqb4i-003EFN-1R for pgpool-general@lists.postgresql.org; Sun, 02 Aug 2026 18:38:16 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wqb4f-00000001elP-2PqD for pgpool-general@lists.postgresql.org; Sun, 02 Aug 2026 18:38:15 +0000 Message-ID: Date: Sun, 2 Aug 2026 21:38:10 +0300 MIME-Version: 1.0 Subject: Re: low level protocol, implicit transactions , "idle in transaction" issue To: Tatsuo Ishii Cc: pgpool-general@lists.postgresql.org, itdev@gatewaynet.com References: <20260731.165638.198450343752871098.ishii@postgresql.org> <71b7c737-265c-456d-af1b-18afbd0aabd1@cloud.gatewaynet.com> <20260801.073525.510696094193506119.ishii@postgresql.org> <20260802.155039.1793042838842141111.ishii@postgresql.org> Content-Language: en-US From: Achilleas Mantzios In-Reply-To: <20260802.155039.1793042838842141111.ishii@postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/2/26 09:50, Tatsuo Ishii wrote: > Hi Achilleas, > >>> Ok but then how can we explain the system complaining about : >>> >>> "DISCARD ALL cannot run inside a transaction block" ? >>> >>> Apparently there was inside a transaction somehow, >> It does not necessarily mean pg_stat_activity shows it as "idle in >> transaction". From my experience, without issuing an explicit >> transaction from client, pg_stat_activity shows "idle" or "active", >> but never "idle in transaction". I guess PostgreSQL distinguish an >> explicit transaction and an implicit transaction. >> >>> and upon hitting >>> the home page the app (Quarkus) apart from the xaction in the logging >>> table didn't start any other explicitly. >>> >>> Also the problem never manifested when against plain vanilla >>> postgresql, or pgbouncer -> postgresql, >>> >>> And only when against pgbouncer -> pgpool -> >>> postgresqlmemory_cache_enabled = true >> Yes, in the case above, pgpool issues do_query which causes open >> implicit transaction. But again, I think it does not cause >> pg_stat_activity showing "idle in transaction". > Patch pushed to all supported branches. > https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=e4a3a0c13e4b5e1a015aca3db238b21b88e73e2f > > As I wroite in the commit messages, I hoped the patch fixes "DISCARD > ALL cannot run inside a transaction block" error. > > However, the original intension of the patch was to fix "idle in > transaction" left in pg_stat_activity. Please try the 4.7 patch if you > like. Thank you Tatsuo for the hard work you are putting into pgpool ! I don't quite feel right about the course of events during this thread, meaning me resorting to our local AI to pull the iron out of the fire, I hope to more personal involvement next round! at least I wish so. > > https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=bc3689a2d62f2083699b86feb267e90296913c26 > > Regards, > -- > Tatsuo Ishii > SRA OSS K.K. > English: http://www.sraoss.co.jp/index_en/ > Japanese:http://www.sraoss.co.jp