Re: Assertion failure in cvs head. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Assertion failure in cvs head.
Date
Msg-id 12467.1095369393@sss.pgh.pa.us
Whole thread Raw
In response to Assertion failure in cvs head.  (Kris Jurka <books@ejurka.com>)
List pgsql-bugs
Kris Jurka <books@ejurka.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

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1255: cannot connect remotely
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1256: Account problems-start as a service option install Windows 2000/ XP