Kris Jurka <books(at)ejurka(dot)com> writes:
> I'm implementing savepoint support for the JDBC driver and I'm seeing an
> assertion failure in cvs head this morning. It seems related to using
> both savepoints and the v3 protocol.
After some study I've decided that that Assert is simply erroneous;
removing it is the easiest fix.
The reason the problem doesn't show up in psql is that the simple-Query
path in postgres.c always drops the Portal before doing finish_xact_command.
Extended query mode doesn't do that, and so we had a situation where an
already-aborted transaction owned a Portal that wasn't aborted (since it
hadn't existed when AtSubAbort_Portals() ran). PortalDrop is perfectly
capable of handling this, at least for a portal containing a ROLLBACK
command (which isn't going to own any resources of significance); so the
right answer is just to soldier on.
It occurs to me that the protocol documentation is a bit out of date in
this connection, since it says "a named portal object lasts till the end
of the current transaction", whereas it needs to say something more like
"till the end of the current transaction or subtransaction". Since we
are trying to pretend that there are no subtransactions, only
SAVEPOINTs, I'm not sure how to word it. Comments?
regards, tom lane
In response to
pgsql-bugs by date
|Next:||From: Conal Tuohy||Date: 2004-09-17 02:14:31|
|Subject: Error starting service on Win2k|
|Previous:||From: PostgreSQL Bugs List||Date: 2004-09-16 20:14:41|
|Subject: BUG #1255: cannot connect remotely|