Re: bug w/ cursors and savepoints

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug w/ cursors and savepoints
Date: 2005-01-25 18:23:15
Message-ID: 20050125182315.GH1581@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]dcc(dot)uchile(dot)cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-01-25 18:29:47 Re: bug w/ cursors and savepoints
Previous Message Tom Lane 2005-01-25 18:19:21 Re: how to add a new column in pg_proc table