Skip site navigation (1) Skip section navigation (2)

Re: PHP and PostgreSQL

From: Daniele Orlandi <daniele(at)orlandi(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, PostgreSQL-interfaces <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: PHP and PostgreSQL
Date: 2000-12-27 14:39:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-interfaces
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.



 Daniele Orlandi - Utility Line Italia -
 Via Mezzera 29/A - 20030 - Seveso (MI) - Italy

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-12-27 15:08:29
Subject: Re: [HACKERS] Re: Tuple-valued datums on Alpha (was Re: 7.1 on DEC/Alpha)
Previous:From: Adam LangDate: 2000-12-27 14:14:40
Subject: Re: RE: [HACKERS] PHP and PostgreSQL

pgsql-interfaces by date

Next:From: Rod TaylorDate: 2000-12-27 15:09:59
Subject: Re: PHP and PostgreSQL
Previous:From: Adam LangDate: 2000-12-27 14:14:40
Subject: Re: RE: [HACKERS] PHP and PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group