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-26 16:56:39
Message-ID: 20050126165639.GA11895@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]dcc(dot)uchile(dot)cl>)
"Ciencias políticas es la ciencia de entender por qué
los políticos actúan como lo hacen" (netfunny.com)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luiz Gonzaga da Mata 2005-01-26 17:17:43 Re: Performance of the temporary table creation and use.
Previous Message Christopher Kings-Lynne 2005-01-26 15:18:52 Backporting pg_dump to 7.4