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

From Alvaro Herrera
Subject Re: bug w/ cursors and savepoints
Date
Msg-id 20050125182315.GH1581@dcc.uchile.cl
Whole thread Raw
In response to Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
On Tue, Jan 25, 2005 at 03:14:07PM -0300, Alvaro Herrera wrote:
> On Tue, Jan 25, 2005 at 12:32:57PM -0500, Tom Lane wrote:
> 
> > So the right fix might involve putting the portal into PORTAL_FAILED
> > state rather than just zapping it completely.
> 
> Strangely, the code comes up simpler after the fix.  Patch attached.

I forgot to mention that I looked at AtAbort_Portals and that while it
has the same test to change the state of an active portal, it's probably
safe to assume that no cursor will be allowed to run from that point on.

Now that I think of it, maybe it's a good idea to add a comment saying
why is that the case.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to add a new column in pg_proc table
Next
From: Tom Lane
Date:
Subject: Re: bug w/ cursors and savepoints