Re: idle in transaction with mod_perl

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: idle in transaction with mod_perl
Дата
Msg-id 20021004150651.Q949@mail.libertyrms.com
обсуждение исходный текст
Ответ на Re: idle in transaction with mod_perl  (<mallah@trade-india.com>)
Список pgsql-admin
On Fri, Oct 04, 2002 at 08:04:37PM +0530, mallah@trade-india.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@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Cannot start the PostgreSQL v7.1.3 database
Следующее
От: Chris Miles
Дата:
Сообщение: Re: PostgreSQL and 2-node failover cluster solutions