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 1u5gCt-004OYZ-Dp for pgsql-general@arkaria.postgresql.org; Fri, 18 Apr 2025 07:32:16 +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 1u5gCr-008uGt-6O for pgsql-general@arkaria.postgresql.org; Fri, 18 Apr 2025 07:32:14 +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 1u5gCp-008uGh-Qu for pgsql-general@lists.postgresql.org; Fri, 18 Apr 2025 07:32:13 +0000 Received: from sonic313-21.consmr.mail.sg3.yahoo.com ([106.10.240.80]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u5gCl-000hnM-3B for pgsql-general@postgresql.org; Fri, 18 Apr 2025 07:32:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1744961523; bh=Vt8zFxpWFQBCJGklWFK+5mU6UUd5hfwaaQuiqE6yxWc=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject:Reply-To; b=q+wzRy1XUkEK3oHRcUOXHGlQRlwyk1Oy2Hqw/L4wz4LProM6BCiaaW98qeFHubeh7JYJ1zc2FXM/7iwOMmT5TeN1xpH9X+BEnO3JDMUqhZtnBEA/kBqRfHitOIi+BozYF2xbche8CwoYJewaOHPd6cZ1Y3x/63PXN9KW1EmJfYHfjxZuVWcmIuo3hv0IxIEudaZjMkFzpgXy0OprmR5yHU8Ouk/S/eVCp55K9EIorkVJrhTKfYFLoGn9uf7tY9ULqdR7DnyyvEJeHrwnfAVOoYd5hL5hqYQw74aW8gmxTrG8HhEoApeCW+LHNYWHMChnVtjJiqy2aGayXNRjfsQntQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1744961523; bh=LxyNB/xvI7VzBAigIADgoSrHKq0oD0yIqAfd0f6QoaP=; h=X-Sonic-MF:X-Sonic-MF:Date:From:To:Subject:From:Subject; b=SuDfmaDkT+IyY0sJ8dUtrCHqrJl06jujNV4bBMXpvHbLsbkK2WxoBZjZCc5KyFHJaiyW8kRMkzUrwI2YJhm3AJDKNVQvtgHMpXVapiwqii/fxN1svYqS6cAylXhwtxCQhk3a9T3ayFaI9ap46naQv62iyFa4+08kTSyzFvyoWHqfz2gBoW3wlcJvuC1ZR4hSELhgL4IXb5Ftr+n7lVeHb56bqjyM1vwCf6aon5ChtqLcd9la3yscykkqybUzscE06/ZAnDBDKm/QrzRrw9q5BdfmpwXFMdhhkfXmUai1OmeuWQ3dyp2Mt3jwV0yk7X0uQj2v2eADwukKXy/wAP0nHg== X-YMail-OSG: ZM72ESkVM1lUQRxYKE22Nam4wbyFksrKGhuqd_9quq7GkVxtgrGzi0U24k5SGCS 3.KQoOi548WLVxHkHiPBh8Oik6vRV2UdQXxakK6J4X5uuqAc_051njnfFDEY5zV_QqDW3vipfWa3 0DHKARNbtR2JuGS3j7g9kdGJOxomK314ReS2_Wwo_gFaA3iw64BmhFRQATvaqpkHY.pNAnd3iUhu NlCjndrqsJ2vI75p9LVSiAd5YPJK__K4BatsUVjp3dilGZLIKV8xn0VhiLQtdr8jW4_tcxBHOkPr Fqt_5jGvz9yn83ANIGDntOyK1NMIXWTIcRgvieg7M0kJFaiBsTyz.f0OGLYazlByvKJMc9p1wyqM t4ZXr.oxAEJih3nAGHIqYc2PJlHpynaoX8Bk8ZdS7CI.W4Ij4Y04M.dGAp_CBVxdZaLIE_XXFOLD cETjsZPCxF3o9WUSf9_F.PkNuVczsGF0wVw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TyP2xAvez9ITWJapZF1lQoH9kj8deH75cWJw7b20Vu9mUgyZJU8T vllPJx5ZJmvByS5j6ochDJ9AaAozeFL5U6ib75p4fGgvYvbFweIzJIb.rG4T1VnKWMb2vsNkVbHP Wd6JBphFEuTYRMdZHWUlROWo5a_83UaMt5cruUlLOOu.CzZQsQA6AlYEzAd0v92Ht96pU7.QTP5W IzFSavysQds1ESnCqVs8Lu3D9ENlAfpZENobOSoauYhsq5bh2gbo4CRiAlP0SVV_ACJeXlubWIC_ WQBs7ZXeSdtoYq5upYGZVbxr_HsAKuaJF9ndNiMsFBbUNTnmA1EiqR4OlU9dC3C0kL1nOnUuvRWt exMV9d0pROyNmFjOsoMRgx9M5GBhzNADxy4PKmV5MZiR.kCNj3aW0eHajDa6CGI_M2yoVDEOFMHW AvI6fvwKXfW..fk3e6Uv7tue.r1mDUEPsdQk_a7KIegDtKkVbejRHlNfo3n3ZFEktmQSV_HC.HTS uZiMYikTg46.9zjE6Jwag1KJ_MPTwgr3FII92slWsgbqWxqsGbb.V9fN5DLGdJke92cn7gygzhkQ ziey8kpa2TeX98TDVMDnU9gr.9yIzkCD4wsvIPZ7YaUPPxaomwf9KUR4qiY8ALgYIdpAqZgRWP19 PtPhOzKI1uFPDblIou.BS8o5LtU._bw2s4cD_xjbLxC1_Xbp8WYNjeW36o.48ph_rvFew7NTGlx. L4ywLhvbA17XnX7RLoG0he1iQm9hr1EwuwEpLapHT7mWY0XR3qhHPOHUPo5TSV07Fw.2B2ytcwUN UtOE9Jfo0doggVGizZTIwcQ-- X-Sonic-MF: X-Sonic-ID: 2e67139e-376d-4e49-b3ca-c3e79413be66 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.sg3.yahoo.com with HTTP; Fri, 18 Apr 2025 07:32:03 +0000 Received: by hermes--production-ne1-9495dc4d7-jjlzl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f266145284183803bbe7e46230345788; Fri, 18 Apr 2025 07:31:59 +0000 (UTC) X-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OBlCjNi7m7wvWzFXO1hH.cfeo1KPl5U9TdDI9WKguJSL9OkqYhp6EsGn.NnQe6Jo7 Q4d9od8jswSYDOWYzF4xnks4ZiVhjZ6N2w07FPjEeYqag7ELWM3D.2Sib_O8bG9g8LvNID3_P2df WZJBLkNgo6W7CwUDhyLe82xaBcjsdUIzdvUtMiFo6171lJdBE4_Xg4k67F3pH1sjS3fqDR2WrvtZ AJFBBtXbQm1nnqMwQ40e6c6c9y8.U6.8BeQoHUQLlRO._X4kydGab9vDgtupTxPtMnamWgt7N94y 0Zw5U X-Sonic-MF: X-Sonic-ID: 8f9cf68d-31a5-42d7-8148-88fac20645e2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic322.consmr.mail.ne1.yahoo.com with HTTP; Fri, 18 Apr 2025 07:31:57 +0000 Date: Fri, 18 Apr 2025 07:31:52 +0000 (UTC) From: "sivapostgres@yahoo.com" Reply-To: "sivapostgres@yahoo.com" To: Pgsql-general , Laurenz Albe Message-ID: <1852089030.3173833.1744961512201@mail.yahoo.com> In-Reply-To: <02e2740edf821e2ce84773c83065b45e9be890cc.camel@cybertec.at> References: <1385521371.3160626.1744955370756.ref@mail.yahoo.com> <1385521371.3160626.1744955370756@mail.yahoo.com> <02e2740edf821e2ce84773c83065b45e9be890cc.camel@cybertec.at> Subject: Re: Error while updating a table MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3173832_1381213279.1744961512200" X-Mailer: WebService/1.1.23665 YMailNorrin Content-Length: 9094 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_3173832_1381213279.1744961512200 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Laurenz, Now I need to do 2 things. 1.=C2=A0 Correct my application to catch errors and do either Rollback or c= ommit.=C2=A0 =C2=A0This part is running smoothly from all other computers, = so far.=C2=A0 Nevertheless I'll check that for any missing catch.2.=C2=A0 F= ind the faulty entry and do rectify. For the second part, how to identify that culprit query?=C2=A0 =C2=A0Seems = this has happened a few days back.=C2=A0 At that time, we had some power is= sues that made network to fail.=C2=A0=C2=A0 To proceed, we need to find the culprit query?=C2=A0 How? Where?=C2=A0 No i= dea what was the pid then, as all computers were shut down every night. Any possibilities?=C2=A0 steps? Happiness Always BKR Sivaprakash On Friday 18 April, 2025 at 12:24:54 pm IST, Laurenz Albe wrote: =20 =20 On Fri, 2025-04-18 at 05:49 +0000, sivapostgres@yahoo.com wrote: > We use PowerBuilder along with PostgreSQL. >=20 > PostgreSQL 15.7 (Ubuntu 15.7-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compi= led by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit >=20 > Suddenly, one system starts throwing an error while updating a record fro= m PowerBuilder. > The same update statement (window) works fine, when run from other comput= ers.=C2=A0 Error > occurs only when the statement is run from a particular computer.=C2=A0 T= he SQL Statement is >=20 > Update public.co_voucherseries_transaction_branch > Set=C2=A0 =C2=A0 vouchernumber=C2=A0 =C2=A0=3D > Where=C2=A0 companycode=C2=A0 =C2=A0 =C2=A0=3D '100' > And=C2=A0 =C2=A0 branchcode=C2=A0 =C2=A0 =C2=A0 =3D '001' > And=C2=A0 =C2=A0 accountperiodid =3D 1 > And=C2=A0 =C2=A0 voucherseries=C2=A0 =C2=A0=3D 'SERIES' > And=C2=A0 =C2=A0 voucherversion=C2=A0 =3D 'version' > And=C2=A0 =C2=A0 activestatus=C2=A0 =C2=A0 =3D 'Y'=C2=A0 ; >=20 > The error is > SQLSTATE=3D25P02 > ERROR: current transaction is aborted, commands ignored until end of tran= saction block; > Error while executing the query >=20 > Through googling, I found that last transaction was not properly rolled b= ack. > The (Postgresql) Linux server will be shut down every night and re-booted= next day morning.=C2=A0 =C2=A0 >=20 > Don't know when this error has occurred.=C2=A0=C2=A0 >=20 > Now I need to rectify this error?=C2=A0 How to do it?=C2=A0 Any help is r= eally appreciated. You would have to improve the code quality of the application, which does n= ot seem to do correct error handling or transaction management. That error means that the *previous* statement (or one of the statements ea= rlier in the same database transaction) has caused an error.=C2=A0 In PostgreSQL, th= at means that the transaction is aborted, and the following statements until the end of t= he transaction will receive the error you experience. So one of the following must be the case: - the previous statement caused an error, but you didn't detect or handle t= hat - the previous transaction run on the same database connection caused an er= ror, =C2=A0 but you forgot to run ROLLBACK Yours, Laurenz Albe =20 ------=_Part_3173832_1381213279.1744961512200 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Laurenz,

Now I need to do 2 things.

1.  Correct my appl= ication to catch errors and do either Rollback or commit.   This = part is running smoothly from all other computers, so far.  Neverthele= ss I'll check that for any missing catch.
2.  Find the faulty entry and do rectify.

For the second part, how to identify that culprit query?   Seems= this has happened a few days back.  At that time, we had some power i= ssues that made network to fail.  

To proceed, = we need to find the culprit query?  How? Where?  No idea what was= the pid then, as all computers were shut down every night.

Any possibilities?  steps?

Happiness Always
= BKR Sivaprakash


=20
=20
On Friday 18 April, 2025 at 12:24:54 pm IST, Lauren= z Albe <laurenz.albe@cybertec.at> wrote:


=20 =20
On Fri, 2025-04-18 at 05:49 +0000, sivapostgres@yahoo.com wrote:

> We use PowerBuilder alon= g with PostgreSQL.
>
> PostgreSQ= L 15.7 (Ubuntu 15.7-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compiled by gcc = (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit
>
> Suddenly, one system starts throwing an error while updating= a record from PowerBuilder.
> The same update stateme= nt (window) works fine, when run from other computers.  Error
> occurs only when the statement is run from a particular comp= uter.  The SQL Statement is
>
= > Update public.co_voucherseries_transaction_branch
&g= t; Set    vouchernumber   =3D <new number>
> Where  companycode     =3D '100'
> And    branchcode      =3D '001'=
> And    accountperiodid =3D 1
> And    voucherseries   =3D 'SERIES'
> And    voucherversion  =3D 'version'
> And    activestatus    =3D 'Y'  ;>
> The error is
> SQLSTATE=3D25P02
> ERROR: current transaction i= s aborted, commands ignored until end of transaction block;
> Error while executing the query
>
> Through googling, I found that last transaction was not properl= y rolled back.
> The (Postgresql) Linux server will be= shut down every night and re-booted next day morning.   
>
> Don't know when this error has occu= rred.  
>
> Now I need= to rectify this error?  How to do it?  Any help is really apprec= iated.


You would have to improve= the code quality of the application, which does not seem
to do correct error handling or transaction management.
=
That error means that the *previous* statement (or one o= f the statements earlier in
the same database transaction= ) has caused an error.  In PostgreSQL, that means that
the transaction is aborted, and the following statements until the end o= f the
transaction will receive the error you experience.<= br clear=3D"none">
So one of the following must be the ca= se:

- the previous statement caused an= error, but you didn't detect or handle that

- the previous transaction run on the same database connection cause= d an error,
  but you forgot to run ROLLBACK

Yours,
Laurenz Albe



------=_Part_3173832_1381213279.1744961512200--