From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to reset a server error '25P02 in_failed_sql_transaction'
Date: Tue, 31 Dec 2019 11:17:41 -0600
Message-ID: <eac4140f-197d-2101-60f8-3f43372208a9@gmail.com> (raw)
In-Reply-To: <CAECtzeXuNe=RLEb8egsCn=-rvM1NNR=Nww8Whj3mbxEbLsc-ag@mail.gmail.com>
References: <20191231055501.GA2812@c720-r342378>
<CAECtzeXuNe=RLEb8egsCn=-rvM1NNR=Nww8Whj3mbxEbLsc-ag@mail.gmail.com>
On 12/31/19 3:40 AM, Guillaume Lelarge wrote:
> Le mar. 31 déc. 2019 à 06:55, Matthias Apitz <guru@unixarea.de
> <mailto:guru@unixarea.de>> a écrit :
>
>
> Hello,
>
> Due to a wrong human input in the GUI of our application our
> application server, from the point of view of the PostgreSQL server it
> is the PostgreSQL client, issues a broken ESQL/C command to the PostgreSQL
> server, here from our own debug logging the command and the error
> message of the server:
>
>
> posDebug: [27.12.2019 15:20:59:043] stmt: SELECT ctid, * from
> titel_datum WHERE desk>='*2019' AND feldnr IN ( 2 ) ORDER BY desk ASC
> , feldnr ASC
> posDebug: [27.12.2019 15:20:59:043] ESQL: PREPARE sid_titel_datum
> FROM :select_anw;
> ==== sqlca ====
> sqlcode: -400
> sqlerrm.sqlerrml: 61
> sqlerrm.sqlerrmc: invalid input syntax for type date: »*2019« on line 918
> ...
>
> All subsequent correct (SELECT ...) statements get rejected with, for
> example:
>
>
> ...
> posDebug: [27.12.2019 15:20:59:044] stmt: SELECT ctid, * from
> titel_datum WHERE desk>='31.12.1900' AND feldnr IN ( 2 ) ORDER BY
> desk ASC , feldnr ASC
> posDebug: [27.12.2019 15:20:59:044] ESQL: PREPARE sid_titel_datum
> FROM :select_anw;
> ==== sqlca ====
> sqlcode: -400
> sqlerrm.sqlerrml: 105
> sqlerrm.sqlerrmc: current transaction is aborted, commands ignored
> until end of transaction block on line 918
> sqlerrd: 0 0 0 0 0 0
> sqlwarn: 0 0 0 0 0 0 0 0
> sqlstate: 25P02
> ========posSqlError=======
> ...
>
> Note: we are not in some kind TRANSACTION block, like 'EXEC SQL BEGIN
> TRANSACTION;'
>
> What is the correct way to abort the "transaction" as requested by the PG
> server to return to normal operations?
>
>
> You need to issue a ROLLBACK. then you'll be able to open another transaction.
But how do you issue a ROLLBACK to a different pid?
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: How to reset a server error '25P02 in_failed_sql_transaction'
In-Reply-To: <eac4140f-197d-2101-60f8-3f43372208a9@gmail.com>
References: <20191231055501.GA2812@c720-r342378> <CAECtzeXuNe=RLEb8egsCn=-rvM1NNR=Nww8Whj3mbxEbLsc-ag@mail.gmail.com> <eac4140f-197d-2101-60f8-3f43372208a9@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox