Re: PHP, PostgreSQL and transactions

From: lbayuk(at)mindspring(dot)com (ljb)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP, PostgreSQL and transactions
Date: 2001-06-23 00:09:43
Message-ID: 9h0mo7$1er0$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

nils(at)mbit(dot)nl wrote:
>Hi all,
>
>I want to make use of PostgreSQL's ability of transactions in a PHP
>application. What happens when a transaction spreads over more than one
>page and a user doesn't continue the transaction?

You can't do it. Read the part in the PHP manual about what persistent
(pooled) connections really are, and what they aren't. They aren't a way
to continue a connection across mutliple page requests. For one thing,
a different web server child process is likely to handle each request.
If you are using persistent connections from PHP to PostgreSQL, you
really must make absolutely sure all transactions are closed at the
end of the page. You can use register_shutdown_function to do this.

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-23 00:10:33 Re: postgres 7.1.2 with SuSE 7.1
Previous Message Bruce Momjian 2001-06-23 00:04:44 Re: [HACKERS] Re: Multiple Indexing, performance impact