Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUHEr-0000Jp-Qa for psycopg@arkaria.postgresql.org; Fri, 24 May 2019 20:56:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUHEq-00064L-EF for psycopg@arkaria.postgresql.org; Fri, 24 May 2019 20:56:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUHEq-00064E-7P for psycopg@lists.postgresql.org; Fri, 24 May 2019 20:56:28 +0000 Received: from smtp125.iad3b.emailsrvr.com ([146.20.161.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUHEm-0003Ub-Jr for psycopg@postgresql.org; Fri, 24 May 2019 20:56:27 +0000 Received: from smtp16.relay.iad3b.emailsrvr.com (localhost [127.0.0.1]) by smtp16.relay.iad3b.emailsrvr.com (SMTP Server) with ESMTP id A1FAAC0253; Fri, 24 May 2019 16:56:22 -0400 (EDT) X-Auth-ID: xof@thebuild.com Received: by smtp16.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 1D283C01A5; Fri, 24 May 2019 16:56:21 -0400 (EDT) X-Sender-Id: xof@thebuild.com Received: from [10.0.1.128] (sfosj0215mups301.wiline.com [67.207.108.210]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:25 (trex/5.7.12); Fri, 24 May 2019 16:56:22 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Proper way to keep count of statements executed within current transaction From: Christophe Pettus In-Reply-To: Date: Fri, 24 May 2019 13:56:18 -0700 Cc: psycopg@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: "Podrigal, Aron" X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On May 24, 2019, at 13:49, Podrigal, Aron = wrote: >=20 > My question is, what is the correct way to detect whether any = statements were executed successfully prior to the connection being = lost. You can't. This is exactly why you have transactions: In the case of a = lost connection, you can assume the transaction was aborted, and retry = the transaction from the start. -- -- Christophe Pettus xof@thebuild.com