From: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: idle in transaction with mod_perl |
Date: | 2002-10-04 19:06:51 |
Message-ID: | 20021004150651.Q949@mail.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Fri, Oct 04, 2002 at 08:04:37PM +0530, mallah(at)trade-india(dot)com wrote:
> I too use mod_perl + postgresql
> its perfectly ok to have "idle in transaction..."
Well, not really. But it's probably normal. See below.
> the persistant connections makes all the difference.
For some reason, most of the persistent
connection/pooling/auto-commit=off approaches in PostgreSQL issue a
BEGIN as soon as a transaction ends.
The problem with this is that several maintenance types of things --
VACUUM FULL being the most obvious -- will conflict with these kinds
of transactions. If you happen to have a connection that stays idle
this way for a long time, it can cause you some little bits of grief
(like by not reclaiming as much disk as it otherwise would, or not
recycling as much in a non-blocking VACUUM, or other similar things).
The real answer is to change the connection pooling &c. But since
that's not likely to happen in a lot of cases, you should just make
sure that you don't perpetually leave around idle connections.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110
From | Date | Subject | |
---|---|---|---|
Next Message | CoL | 2002-10-04 20:04:28 | Re: Replication, High availability |
Previous Message | Tom Lane | 2002-10-04 18:14:23 | Re: Cannot start the PostgreSQL v7.1.3 database |