Re: cursors outside transactions

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cursors outside transactions
Date: 2003-03-18 03:37:31
Message-ID: 20030318033731.GA9712@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 17, 2003 at 10:26:07PM -0500, Neil Conway wrote:
> On Mon, 2003-03-17 at 22:01, Alvaro Herrera wrote:
> > What about opening a pseudo-transaction that exists only to serve the
> > cursor?
>
> What exactly do you mean by a pseudo-transaction?

Assign an xid, create the transaction (create a pg_clog entry), open the
cursor using that xid, and put that xid into some table so it can be
ended when the cursor is closed. That's why I said you'll probably need
to access the lowlevel routines for transactions. OTOH I can hear
objections to that idea right now...

> Keep in mind we don't have nested transactions (yet?),

I'm looking at the issues about this. I don't think that facility will
help you, since you have to end the inner transactions before you end
the outer ones. That is, you can't create a normal subtransaction to
hold the cursor and expect it to live longer than the outer one.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Oh, oh, las chicas galacianas, lo harán por las perlas,
¡Y las de Arrakis por el agua! Pero si buscas damas
Que se consuman como llamas, ¡Prueba una hija de Caladan! (Gurney Halleck)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2003-03-18 03:40:18 Re: [INTERFACES] Roadmap for FE/BE protocol redesign
Previous Message Neil Conway 2003-03-18 03:26:07 Re: cursors outside transactions