Re: cursors outside transactions

From: Neil Conway <neilc(at)samurai(dot)com>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cursors outside transactions
Date: 2003-03-18 04:31:33
Message-ID: 1047961893.19385.62.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2003-03-17 at 22:52, Hiroshi Inoue wrote:
> I have never meant (1) by cursors outside transactions.

I'm sorry, I don't understand.

> BTW why are updatable and sensitive cursors easier
> to implement using (2).

(Note that I haven't looked into implementing either feature in depth.)

My guess is that updateable cursors would be easier with an MVCC-based
approach because the executor would still be accessing the data that is
being returned. So subsequently updating the tuple would be easier (say,
based on its TID), as you could be sure that whatever means you used to
ensure the tuple was OK for reading would go most of the way to ensuring
that it was OK for writing.

Sensitive cursors would be easier to implement just due to the nature of
sensitivity: if you make a separate copy of the tuples in the
tuplestore, how do you check to see if they have been concurrently
updated?

Note that neither of these points carries much weight with me: if and
when someone actually steps forward to implement either feature, we can
take it into account. I'm personally planning to do updateable cursors
after holdable ones, but only for the non-holdable case (i.e.
updateability and holdability will be mutually exclusive).

Cheers,

Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-18 04:44:33 Re: [HACKERS] SQL99 ARRAY support proposal
Previous Message Bruce Momjian 2003-03-18 04:31:27 Re: cursors outside transactions