Re: bug w/ cursors and savepoints - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: bug w/ cursors and savepoints
Date
Msg-id 20050125170623.GA1581@dcc.uchile.cl
Whole thread Raw
In response to Re: bug w/ cursors and savepoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bug w/ cursors and savepoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
On Tue, Jan 25, 2005 at 02:40:51AM -0500, Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
> > Someone at Fujitsu pointed out the following bug in 8.0:
> > begin;
> > savepoint x;
> > create table abc (a int);
> > insert into abc values (5);
> > declare foo cursor for select * from abc;
> > rollback to x;
> > fetch from foo; -- hits an Assert()
> 
> Offhand I'd say this should draw a "no such cursor as foo" error.
> I'm too tired to look into why foo still exists after the rollback...

At this point, gdb says that the portal is in PORTAL_READY state.  The
code says to keep it open and reassign it to the parent subxact.  I
don't remember what the rationale for this was ... I'll review the
discussion about this.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)


pgsql-hackers by date:

Previous
From: Patrick Welche
Date:
Subject: Re: Goals for 8.1
Next
From: Tom Lane
Date:
Subject: Re: bug w/ cursors and savepoints