Re: cursors outside transactions - Mailing list pgsql-hackers

From Neil Conway
Subject Re: cursors outside transactions
Date
Msg-id 1047961893.19385.62.camel@tokyo
Whole thread Raw
In response to Re: cursors outside transactions  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List 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



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: anyone? CREATELANG in pgsql 7.3.2 failing
Next
From: Bruce Momjian
Date:
Subject: Re: cursors outside transactions