Re: persistent portals/cursors (between transactions)

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Florian Wunderlich <fwunderlich(at)devbrain(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: persistent portals/cursors (between transactions)
Date: 2002-01-25 05:18:11
Message-ID: 200201250518.g0P5IBM01992@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > >> I forgot to mention that I'd like to implement a cross
> > >> transaction insensitive(and read-only) cursors which
> > >> any proper dbms seems to have the functionality.
> >
> > > That is a good idea, especially read-only, that will not require any
> > > locks.
> >
> > If it's not holding any locks, I can guarantee you it's not insensitive.
> > Consider VACUUM, or even DROP TABLE.
>
> I assumed it would be an in-memory copy of the cursor, like a portal
> that doesn't go away on transaction exit.

Ever realized what a portal is? So far it's a query for which
ExecutorStart() has been called, just sitting there, waiting
for subsequent ExecutorRun() calls.

How such a thing can live outside of any transaction context
isn't totally clear to me, even if I have to admit that I see
by now the desire for cross transaction cursors. It's just
these lil' details like "how does the portal maintain it's
snapshot POV after the transaction creating it is long
gone?", that make me nervous.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hiroshi Inoue 2002-01-25 07:45:40 Re: persistent portals/cursors (between transactions)
Previous Message Bruce Momjian 2002-01-25 04:32:49 Re: persistent portals/cursors (between transactions)