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

Re: Assertion failure with a subtransaction and cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Assertion failure with a subtransaction and cursor
Date: 2009-11-22 18:01:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On all versions starting from 8.0 where subtransactions were introduced,
> this causes an assertion failure:

Ugh :-(

This ties into the more general issue that it's not clear what effect a
subtransaction rollback should have on a cursor.  You could argue that
ideally the cursor should revert to its pre-savepoint state.  We didn't
implement that in 8.0 because it seemed too hard, but this bug shows
that not rolling back the cursor isn't exactly easy either.

Not sure what to do.  The only fix that seems bulletproof at the moment
is to declare that any cursor that's been touched at all in a
subtransaction is marked "broken" if the subtransaction rolls back.
That might be too great a loss of functionality.  It would block off
the controversial aspects of behavior though ...

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Robert HaasDate: 2009-11-23 04:34:23
Subject: Re: BUG #5203: Rule affecting more than one row is only fired once, when there is no reference to the row.
Previous:From: Heikki LinnakangasDate: 2009-11-22 10:30:20
Subject: Assertion failure with a subtransaction and cursor

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