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.94.2) (envelope-from ) id 1sK29s-007zNY-KW for pgsql-general@arkaria.postgresql.org; Wed, 19 Jun 2024 20:43:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sK29q-006nbg-0m for pgsql-general@arkaria.postgresql.org; Wed, 19 Jun 2024 20:43:54 +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.94.2) (envelope-from ) id 1sK29p-006nbY-M2 for pgsql-general@lists.postgresql.org; Wed, 19 Jun 2024 20:43:54 +0000 Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sK29o-002Wzb-2m for pgsql-general@postgresql.org; Wed, 19 Jun 2024 20:43:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 417101380241; Wed, 19 Jun 2024 16:43:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 19 Jun 2024 16:43:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718829830; x=1718916230; bh=sM1D8EOGw0O8lQTEazDYcJ5Tumq8r/n7Xn67pICDVYg=; b= ShVsSpx0GUJWq8bJyZZhptsgejEE97t7hZp4uEnsN7imkRKzevxpcnA1NAftGer5 ZYxNfETtOfceUH9Vo0/9PgA5alLrBIWLdBqfpl7hKyURJynMWjYanLG9jjvUDnUn 4OPTwFwS0wxQ9T+lJzlgrZVEYdsn/IBEE4sJM9tq2fD9giYa0aJrA9HBF9ZKsk5f f8zPpNBBXkAYAKDDVsX06lpilDqfXOdWM63MTxWTUeXYPWoq7RH+bfgy131imZQ7 cTvKrNwmWft/D66JjCgI8dgnl2C4L834n33ndjsOwZIlvmM4eLaXjcrFREGR9Wk3 slsOgwgDjg3ws+uBY7u9jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718829830; x= 1718916230; bh=sM1D8EOGw0O8lQTEazDYcJ5Tumq8r/n7Xn67pICDVYg=; b=B c8AfO831vQ3CwIt3S5bNh2LLmqvP8vruCRuO6KwVYGwoEAAgeIYxnIP7kdqMGV53 d4wJrwnXFbx5etrUcoyxOYRqa1+HohF2zlRA4n5E8ytf3YQ2MPnBLNKnys3FB6HE DtKaOh6AIRzg6aIOgckSKaIladMQa3YccEBqsXg3WrIkiQP8zlPzKh9H/fQ+4QLK ddcUg/6W55NaUKT3VRvgPQa6T3VzukR5Kv9C72+ZgMAJ63zQCctSGskto+28yDqY sderEf5N//di9UAJtv0NDnCSQdXafrJCS910CM5NAxTkzAoZGpt8OL7+1RDwu9uz N0HOnO00toTm+rQNEok7A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepffelgeeifefgveduhedthfekuedtffejveegffeg jeevtdehgfduieetfeehjeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 16:43:49 -0400 (EDT) Message-ID: Date: Wed, 19 Jun 2024 13:43:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Transaction issue To: Rich Shepard , PostgreSQL General References: <65F95FD4-CBEA-4E66-AE63-EBC9F617C988@gmail.com> <7678da90-521-3b52-4bb5-11bc9bdf6d1@appl-ecosys.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <7678da90-521-3b52-4bb5-11bc9bdf6d1@appl-ecosys.com> 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 6/19/24 13:33, Rich Shepard wrote: > On Wed, 19 Jun 2024, Alban Hertroys wrote: > >> The error prior to those statements is what you need to look at. That’s >> what’s causing the transaction to fail. > > Alban/Adrian, > >> I get the impression that you’re executing shell scripts that run the >> psql >> command-line utility. > > That's what I do as I've not taken the time to finish the GUI with TKinter. > > Here's the latest example: > bustrac=# \i insert-law-offices-addr.sql > psql:insert-law-offices-addr.sql:1: ERROR:  current transaction is > aborted, commands ignored until end of transaction block > psql:insert-law-offices-addr.sql:69: ERROR:  current transaction is > aborted, commands ignored until end of transaction block Looks to me you have a left over unresolved transaction in your psql session. The easiest solution if that is the case is to exit the session and start a new session to run the script. > > Line 1 is the BEGIN; statement; line 69 is the last row of data to be > inserted. > > Thanks, > > Rich > > -- Adrian Klaver adrian.klaver@aklaver.com