Re: [IDLE in TRANSACTION] when I do TOP -c

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [IDLE in TRANSACTION] when I do TOP -c
Дата
Msg-id 43BDC0C6.1080205@opencloud.com
обсуждение исходный текст
Ответ на [IDLE in TRANSACTION] when I do TOP -c  (Fabrice.Sznajderman@devoteam.com)
Список pgsql-jdbc
Fabrice.Sznajderman@devoteam.com wrote:

> I look the processes on my server where was installed Postgres Database.
> I can saw, when I do top command, many process named : idle in transaction.
>
> What happend with this process? what is the cause of this message?

Each process corresponds to a single client connection to the database.

"idle in transaction" means that connection has a transaction open but
is not currently doing any work. If I had to guess at the cause of this
I'd say that you are using a connection pool and a 7.4 driver.

The JDBC driver would cause these idle transactions itself (mostly
harmlessly) in 7.4 and earlier releases when autocommit was off: a
commit or rollback would automatically start a new transaction even
before any queries had been run.

With 8.0 and later drivers a new transaction is only started when the
first query after a commit or rollback is done, so if you are using
these drivers it probably indicates an application bug where it is not
correctly closing transactions it begins.

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Fw: Re: GROUP_CONCAT in PostgreSQL
Следующее
От: "hpb@htl-steyr.ac.at"
Дата:
Сообщение: Re: bug in getTime after insertRow with postgresql-8.1-404.jdbc3.jar