X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 75A1D475921 for ; Sun, 30 Mar 2003 15:33:16 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id C6D92475B8A for ; Sun, 30 Mar 2003 15:33:15 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2UKWoub006192; Sun, 30 Mar 2003 15:32:50 -0500 (EST) To: Peter Eisentraut Cc: Hiroshi Inoue , Bruce Momjian , Neil Conway , PostgreSQL Hackers Subject: Re: updateable cursors & visibility In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Sat, 29 Mar 2003 16:42:46 +0100" Date: Sun, 30 Mar 2003 15:32:50 -0500 Message-ID: <6191.1049056370@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/1195 X-Sequence-Number: 37441 Peter Eisentraut 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