"idle in transaction" postgres connection

From: tamanna madaan <tamanna(dot)madaan(at)globallogic(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: "idle in transaction" postgres connection
Date: 2011-08-18 09:34:25
Message-ID: CAD4qJ_+m6SszdpCb=9zW07zqAcq6pRrozKQppmHcpgD0LUjUvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi All

I am using postgres-8.4.0 on a cluster setup with slony-2.0.4 being used for
replication.
Recently , I saw a "idle in transaction" postgres process as below.

postgres 13052 14742 0 May13 ? 00:00:00 postgres: slon abc 172.16.1.1(49017)
idle in transaction

I wonder what could have lead to that hung postgres process . I googled
about it a lot and they say that it could be
because of abrupt netwotk issue between slony and postgres . But in my case
slon was connected
to its local postgres database. So, network wont be an issue in this case .
Restarting the slon/postgres resolves
the issue. But, there are other processes also in my application which
connect to postgres using psqlODBC . Those
processes can also cause "idle in transaction" postgres connection . I can't
afford restarting any of the processes
to resolve this issue. So, I was wondering if I can make use of
tcp_keepalives_idle , tcp_keepalives_interval and
tcp_keepalives_count configurations in postgresql.conf to get rid of this
"idle in transaction" processes
after a certain amount of time . Will this help or not ??

Thanks...
Tamanna

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Mark Morgan Lloyd 2011-08-19 17:43:53 Listen/notify and ODBC
Previous Message Silvio Brandani 2011-08-04 13:47:22 Re: [JDBC] Postgres Server Jdbc driver error