pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: updateable cursors & visibility
Date: Sun, 30 Mar 2003 15:32:50 -0500
Message-ID: <6191.1049056370@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0303291259210.2289-100000@peter.localdomain>
References: <Pine.LNX.4.44.0303291259210.2289-100000@peter.localdomain>

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




view thread (34+ messages)  latest in thread

Message-ID: <6191.1049056370@sss.pgh.pa.us>
Permalink:  ../6191.1049056370@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6191.1049056370@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, Inoue@tpf.co.jp, pgman@candle.pha.pa.us, neilc@samurai.com
  Subject: Re: updateable cursors & visibility
  In-Reply-To: <6191.1049056370@sss.pgh.pa.us>
  References: <Pine.LNX.4.44.0303291259210.2289-100000@peter.localdomain> <6191.1049056370@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox