Re: PHP and PostgreSQL
От | Daniele Orlandi |
---|---|
Тема | Re: PHP and PostgreSQL |
Дата | |
Msg-id | 3A49FF12.91CA2183@orlandi.com обсуждение исходный текст |
Ответ на | PHP and PostgreSQL (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-hackers |
Bruce Momjian wrote: > > I have been asked by the major PHP developer Rasmus Lerdorf to see if > the PostgreSQL/PHP interface needs any improvements. > > Is the current PostgreSQL interface module in PHP adequate? Does it > support all the current libpq features? > > If not, would someone submit some patches to the PHP folks. They want > us to work well with PHP. They are basically encouraging us to improve > it in any way we can. If I can put my 0.02 Euros, I think there are two issues that deserve to be fixed, both are relative to persistent connections. The first is that the transaction state is (obviously) kept between connections. This is not a problem in itself, but there are some situations where the transaction block is not closed with COMMIT or ABORT with the obvious consequencies when the connection is reused (and with the locks not released). As a workaround I registered a shutdown funcion that sends an ABORT command every time a script finishes his processing but this results in a "Not in trasaction block" error most of the time (harmless but pretty annoying). IMHO there should be some sort of lightweight reset that puts the connection in its pristine state without the need to fork a backend againg and reopen the TCP connection. The second is that if PostgreSQL is restarted, PHP doesn't detect that and an error message is seen for every persistent connection. IMHO PHP should detect a closed connection and clear the connections pool. Bye! -- Daniele -------------------------------------------------------------------------------Daniele Orlandi - Utility Line Italia - http://www.orlandi.comViaMezzera 29/A - 20030 - Seveso (MI) - Italy -------------------------------------------------------------------------------
В списке pgsql-hackers по дате отправления: