From: Daniele Orlandi <daniele@orlandi.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Cc: PostgreSQL-interfaces <pgsql-interfaces@postgreSQL.org>
Subject: Re: PHP and PostgreSQL
Date: Wed, 27 Dec 2000 14:39:14 +0000
Message-ID: <3A49FF12.91CA2183@orlandi.com> (raw)
References: <200012270556.AAA19258@candle.pha.pa.us>
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.com
Via Mezzera 29/A - 20030 - Seveso (MI) - Italy
-------------------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: daniele@orlandi.com, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: PHP and PostgreSQL
In-Reply-To: <3A49FF12.91CA2183@orlandi.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox