pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: PostgreSQL server "idle in transaction"
Date: Tue, 15 Nov 2022 10:28:11 -0500
Message-ID: <1070974.1668526091@sss.pgh.pa.us> (raw)
In-Reply-To: <af10f913-dfbb-0f86-4fdd-10e51ce87f1e@aklaver.com>
References: <20221115122813.GA9@sh4-5.1blu.de>
	<af10f913-dfbb-0f86-4fdd-10e51ce87f1e@aklaver.com>

Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 11/15/22 04:28, Matthias Apitz wrote:
>> I have below the full ESQL/C log and do not understand, why the
>> PostgreSQL server is thinking "idle in transaction". For me with the
>> "COMMIT" on the line below marked with ^^^^^ the transaction was closed.

> From your log:

> [6978] [15.11.2022 11:05:50:172]: ECPGtrans on line 1211: action 
> "commit"; connection "testdb"
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [6978] [15.11.2022 11:05:50:173]: ecpg_execute on line 543: query: 
> select name from pg_cursors where name = $1 ; with 1 parameter(s) on 
> connection testdb

> So that query is being executed after the COMMIT.

Right.  By default, ecpg would start a new transaction block for that.
See

https://www.postgresql.org/docs/current/ecpg-commands.html#ECPG-TRANSACTIONS

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <1070974.1668526091@sss.pgh.pa.us>
Permalink:  ../1070974.1668526091@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1070974.1668526091@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, guru@unixarea.de
  Subject: Re: PostgreSQL server "idle in transaction"
  In-Reply-To: <1070974.1668526091@sss.pgh.pa.us>
  References: <20221115122813.GA9@sh4-5.1blu.de> <af10f913-dfbb-0f86-4fdd-10e51ce87f1e@aklaver.com> <1070974.1668526091@sss.pgh.pa.us>

* 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