Re: updateable cursors & visibility - Mailing list pgsql-hackers

From Tom Lane
Subject Re: updateable cursors & visibility
Date
Msg-id 6191.1049056370@sss.pgh.pa.us
Whole thread Raw
In response to Re: updateable cursors & visibility  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: updateable cursors & visibility  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Hiroshi Inoue writes:
>> Must a SENSITIVE cursor see other applications' changes made
>> while the cursor is open ?
> Yes.  It is immaterial whether the change came from a different
> application or the same one.
> Nevertheless, the cursor sensitivity does not excuse you from observing
> the transaction isolation level.  So even if the cursor is sensitive you
> should not be able to see other transactions' changes if you are in a
> serializable transaction.

Serializable or not, there is a good case for saying that cursors don't
see changes made after they are opened, period.  The current
implementation locks down the cursor's snapshot at DECLARE time.  If we
allow the snapshot to change later, what in the world will the semantics
be?  Will we go back to re-scan rows that we previously skipped?  I do
not think we have a prayer of making consistent, predictable behavior
that works any other way.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Detecting corrupted pages earlier
Next
From: mlw
Date:
Subject: Re: PostgreSQL and SOAP, suggestions?