Re: using CURSOR with PHP

Поиск
Список
Период
Сортировка
Искать
От
Keary Suska
Тема
Re: using CURSOR with PHP
Дата
в 15:53:13
Msg-id
B9193C45.EE44%hierophant@pcisys.net
Ответ на
Список
Дерево обсуждения
Re: using CURSOR with PHP (completely OT) Jurgen Defurne <jurgen.defurne@pandora.be>
on 5/28/02 10:26 AM, marco@esi.it purportedly said:

> Well, with HTTP keepalive, it may even keep the HTTP session open.
> But the problem is that you can't relay on it.
> Moreover, I suspect that PHP resets the SQL session when it performs
> an pconnect (that means, it asks the SQL backend to abort uncommitted
> transactions, drop TEMP relations, and so on).

Actually, no. According to the docs:

"Warning
There are a couple of additional caveats to keep in mind when using
persistent connections. One is that when using table locking on a persistent
connection, if the script for whatever reason cannot release the lock, then
subsequent scripts using the same connection will block indefinitely and may
require that you either restart the httpd server or the database server.
Another is that when using transactions, a transaction block will also carry
over to the next script which uses that connection if script execution ends
before the transaction block does. In either case, you can use
register_shutdown_function() to register a simple cleanup function to unlock
your tables or roll back your transactions. Better yet, avoid the problem
entirely by not using persistent connections in scripts which use table
locks or transactions (you can still use them elsewhere)."

I had heard that this auto-cleanup functionality was supposed to be added,
and there is a directive "pgsql.auto_reset_persistent" that is undocumented,
that perhaps implements this, but it may be considered experimental. Unless
the docs aren't properly up to date, which is not uncommon.


Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

В списке pgsql-php по дате отправления
От: Eckhard Hoeffner
Дата:
Сообщение: Re: using CURSOR with PHP
От: Andrew McMillan
Дата:
Сообщение: Re: using CURSOR with PHP
FAQ