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

From Alvaro Herrera
Subject Re: bug w/ cursors and savepoints
Date
Msg-id 20050126165639.GA11895@dcc.uchile.cl
Whole thread Raw
In response to Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: bug w/ cursors and savepoints
List pgsql-hackers
On Tue, Jan 25, 2005 at 02:06:24PM -0300, Alvaro Herrera wrote:

Hackers,

> 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.

Our conclusion at the time was that cursors created inside failed
subtransactions should remain open.  See the proposal and followup
discussion starting here:

http://archives.postgresql.org/pgsql-hackers/2004-07/msg00700.php

If we want to keep this behavior then we should not close all READY
cursors as per my previous patch.  We should keep them open, and only
mark FAILED those cursors that are related to state reversed by the
aborting subtransaction.

I don't see any way to do this cleanly, until we have some relcache-
dependency checking on Portals (maybe anything else?).  Not sure what we
can do about it right now, with 8.0.1 release tomorrow.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Ciencias políticas es la ciencia de entender por quélos políticos actúan como lo hacen"  (netfunny.com)


pgsql-hackers by date:

Previous
From: Luiz Gonzaga da Mata
Date:
Subject: Re: Performance of the temporary table creation and use.
Next
From: noman naeem
Date:
Subject: Data statement format used by the .sh scripts