pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Achilleas Mantzios <achill@matrix.gatewaynet.com>
Cc: pgsql-admin@postgresql.org, "Patrick De Zlio" <pchemla01@gmail.com>
Subject: Re: How to kill process "idle in transaction"
Date: Wed, 31 Oct 2007 16:47:28 -0500
Message-ID: <dcc563d10710311447t2a2519f7n59d3e2a1c06b6f79@mail.gmail.com> (raw)
In-Reply-To: <200710301111.02475.achill@matrix.gatewaynet.com>
References: <58729a240710300145m4457f63euc15007893e8a805c@mail.gmail.com>
	<200710301111.02475.achill@matrix.gatewaynet.com>

On 10/30/07, Achilleas Mantzios <achill@matrix.gatewaynet.com> wrote:
> Óôéò Ôñßôç 30 Ïêôþâñéïò 2007 10:45, ï/ç Patrick De Zlio Ýãñáøå:
> > Hi,
> >
> > We are running PostgreSQL 8.2.4 with quite highly updated millions rows
> > tables.
> >
> > It comes sometimes to get some "idle in transaction" processes, which
> > doesn't have first really viewable effect out of giving very bad estimated
> > numbers for pgclass.reltuples and, if we let them run as it is, block the
> > autovacuum from releasing rows, and after few days some worse problems.
> >
> > Now we are able to detect these "idle in transaction" processes, but what
> > to do with them ?
> >
> > What to do to avoid such situation? How to find the bad request which put
> > the process in this state? From the time it is idle in transaction, we
> > can't see the query in the pg_lock table anymore.
> >
> > How to deal with such process when it is already idle in transaction? can
> > we simply kill it? It is a backend from pgpool. Can we simply restart it
> > (how) without restarting all the database?
>
> Some connection pools issue a BEGIN on the connection just
> after the previous user of the connection issues COMMIT and
> then closes it (Jboss does it). So, <IDLE> in transaction is not
> apriori bad.

You can turn off that behaviour, IIRC.  It is broken behaviour as far
as pgsql is concerned, I believe.


view thread (6+ messages)  latest in thread

Message-ID: <dcc563d10710311447t2a2519f7n59d3e2a1c06b6f79@mail.gmail.com>
Permalink:  ../dcc563d10710311447t2a2519f7n59d3e2a1c06b6f79@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10710311447t2a2519f7n59d3e2a1c06b6f79@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, achill@matrix.gatewaynet.com, pchemla01@gmail.com
  Subject: Re: How to kill process "idle in transaction"
  In-Reply-To: <dcc563d10710311447t2a2519f7n59d3e2a1c06b6f79@mail.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