Re: Persistent connections and transactions
| From: | Frank Joerdens | Date: | Fri, 26 Jan 2001 17:46:07 +0000 |
| Subject: | Re: Persistent connections and transactions | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36829@lists.php.net to get a copy of this message | ||
On Fri, Jan 26, 2001 at 11:01:14AM +0000, Nuno Silva wrote:
[ . . . ]
> i ran across this transaction problem vs. persistent conn in pgsql some time ago.
>
> I found two workaround methods:
> - don't use persistent conn's :-) or;
> - start every conn with the usual pg_pconnect and then query a rollback to the server:
> $query="ROLLBACK work;"
>
> (this will kill any supposed transaction in ABORT STATE that some child had left).
>
> postgres don't support nested transactions (yet), but when it does maybe you should add
> multiple "ROLLBACK WORK;" queries :-)
Ah. Very cool. What I _still_ don't quite understand, though, is _how_
exactly this situation could come about. And what the worst case would
be. What if you don't kill the transaction in ABORT STATE?
Ta, Frank