Re: cursors outside transactions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: cursors outside transactions
Дата
Msg-id 20030318033731.GA9712@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: cursors outside transactions  (Neil Conway <neilc@samurai.com>)
Список 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)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: cursors outside transactions
Следующее
От: Neil Conway
Дата:
Сообщение: Re: [INTERFACES] Roadmap for FE/BE protocol redesign