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 1pr7gW-0004gv-Hf for pgsql-general@arkaria.postgresql.org; Tue, 25 Apr 2023 01:41:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pr7gV-000619-1y for pgsql-general@arkaria.postgresql.org; Tue, 25 Apr 2023 01:41:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pr7gU-000610-NM for pgsql-general@lists.postgresql.org; Tue, 25 Apr 2023 01:41:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pr7gO-001j7f-3g for pgsql-general@lists.postgresql.org; Tue, 25 Apr 2023 01:41:33 +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 33P1fPEh589775; Mon, 24 Apr 2023 21:41:25 -0400 From: Tom Lane To: Merlin Moncure cc: "David G. Johnston" , David Wheeler , Siddharth Jain , pgsql-general@lists.postgresql.org Subject: Re: what happens if a failed transaction is not rolled back? In-reply-to: References: <5AE892DD-A808-4874-AAD4-C47E5C92E28D@gmail.com> <548096.1682371213@sss.pgh.pa.us> Comments: In-reply-to Merlin Moncure message dated "Mon, 24 Apr 2023 19:21:12 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <589773.1682386885.1@sss.pgh.pa.us> Date: Mon, 24 Apr 2023 21:41:25 -0400 Message-ID: <589774.1682386885@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Merlin Moncure writes: > Hm. I also noticed when looking at this that aborted transactions with > savepoints are not subjected to the idle_in_transaction timeout which is a > bit surprising. Hmm ... I think it's intentional that idle_in_transaction no longer applies once the transaction has failed. But if there's a live savepoint, then we should enforce it since resources may still be held. Seems like a bug, if your observation is accurate. regards, tom lane