Re: Pg + perl + apache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Pg + perl + apache
Дата
Msg-id 10987.1076882888@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Pg + perl + apache  ("Michael L. Artz" <dragon@october29.net>)
Список pgsql-general
"Michael L. Artz" <dragon@october29.net> writes:
> Anway, DBD::Pg throws random errors into my logs, along the lines of
> what is below (the lines beginning with SQL are debug statements from
> the script, and are the lines references by the DBD error.

> LOG:  statement: SELECT session_key FROM session WHERE user_id = 101
> ERROR:  current transaction is aborted, queries ignored until end of
> transaction block

This error cannot occur unless some other error occurred previously in
the same transaction.

My bet is that you are using some sort of connection-pooling mechanism,
and are being sloppy about handing off database connections from one
Apache thread to another.  Specifically, some thread is getting an error
and then letting go of the connection without rolling back the failed
transaction on the database side.  The next guy who gets that connection
from the pool fails as above.

            regards, tom lane

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

Предыдущее
От: Andrew Rawnsley
Дата:
Сообщение: Re: PostgreSQL License
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: PostgreSQL License