Re: PostgreSQL server "idle in transaction"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL server "idle in transaction"
Дата
Msg-id 1070974.1668526091@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL server "idle in transaction"  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: PostgreSQL server "idle in transaction"  (Matthias Apitz <guru@unixarea.de>)
Re: PostgreSQL server "idle in transaction"  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: PostgreSQL server "idle in transaction"
Следующее
От: "Karthik Jagadish (kjagadis)"
Дата:
Сообщение: Index not getting cleaned even though vacuum is running