Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ym4Pr-0006le-4d for pgsql-docs@arkaria.postgresql.org; Sat, 25 Apr 2015 18:02:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ym4Pp-0007iW-Na for pgsql-docs@arkaria.postgresql.org; Sat, 25 Apr 2015 18:02:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ym4Po-0007iQ-U7 for pgsql-docs@postgresql.org; Sat, 25 Apr 2015 18:02:57 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Ym4Pl-0003gA-Lh for pgsql-docs@postgresql.org; Sat, 25 Apr 2015 18:02:55 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Ym4Ph-0005wT-85; Sat, 25 Apr 2015 14:02:49 -0400 Date: Sat, 25 Apr 2015 14:02:49 -0400 From: Bruce Momjian To: Kevin Grittner Cc: "David G. Johnston" , Peter Eisentraut , "pgsql-docs@postgresql.org" Subject: Re: Add a new table for Transaction Isolation? Message-ID: <20150425180249.GA17791@momjian.us> References: <1691752982.3879494.1429908040587.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <1691752982.3879494.1429908040587.JavaMail.yahoo@mail.yahoo.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 24, 2015 at 08:40:40PM +0000, Kevin Grittner wrote: > And, for reasons given above, I really question whether such a > table doesn't do more harm than good. Even those citing the paper > by Berenson, et al., often miss the text in *that* paper about what > the actual definition of serializable transactions in the standard > is, and instead focus on the quick-to-read tables of how the > misinterpretation of serializable transactions based on the > standard's table of phenomena (which the paper dubs "ANOMALY > SERIALIZABLE") differs from truly serializable behavior. > > People do love tables like this, which makes providing them > tempting; but when a short, clean table is available they often > seem less inclined to take the trouble to read the real information > the table summarizes -- and they come away with distorted and > incorrect ideas about the subject matter. I don't think we can abandon the table --- people have enough trouble figuring this out, including me, and without the table, it will be even harder. What I have done is to add two rows and one column to the table, and changed the surrounding text to more clearly reference the table. You can see the output here, and the SGML patch is attached: http://momjian.us/expire/transaction-iso.html -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --uAKRQypu60I7Lcqm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="isolation.diff" diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml new file mode 100644 index f88b16e..3120e1f *** a/doc/src/sgml/mvcc.sgml --- b/doc/src/sgml/mvcc.sgml *************** *** 150,162 **** transaction isolation level ! The four transaction isolation levels and the corresponding ! behaviors are described in . ! Standard <acronym>SQL</acronym> Transaction Isolation Levels ! --- 150,162 ---- transaction isolation level ! The SQL standard and PostgreSQL-implemented transaction isolation levels ! are described in .
! Transaction Isolation Levels ! *************** *** 171,182 **** Phantom Read ! Read uncommitted Possible --- 171,206 ---- Phantom Read + + Serialization Anomalies + ! Read uncommitted (SQL Standard) ! ! ! Possible ! ! ! Possible ! ! ! Possible ! ! ! Possible ! ! ! ! ! ! Read uncommitted (PostgreSQL) ! ! ! Not possible Possible *************** *** 202,212 **** Possible ! Repeatable read Not possible --- 226,260 ---- Possible + + Possible + ! Repeatable read (SQL Standard) ! ! ! Not possible ! ! ! Not possible ! ! ! Possible ! ! ! Possible ! ! ! ! ! ! Repeatable read (PostgreSQL) ! ! ! Not possible Not possible *************** *** 232,258 **** Not possible
! In PostgreSQL, you can request any of the ! four standard transaction isolation levels. But internally, there are ! only three distinct isolation levels, which correspond to the levels Read ! Committed, Repeatable Read, and Serializable. When you select the level Read ! Uncommitted you really get Read Committed, and phantom reads are not possible ! in the PostgreSQL implementation of Repeatable ! Read, so the actual ! isolation level might be stricter than what you select. This is ! permitted by the SQL standard: the four isolation levels only ! define which phenomena must not happen, they do not define which ! phenomena must happen. The reason that PostgreSQL ! only provides three isolation levels is that this is the only ! sensible way to map the standard isolation levels to the multiversion ! concurrency control architecture. The behavior of the available ! isolation levels is detailed in the following subsections. --- 280,309 ---- Not possible + + Not possible + ! In PostgreSQL, you can request any of ! the four standard transaction isolation levels, but internally only ! three distinct isolation levels are implemented, i.e. PostgreSQL's ! Read Uncommitted mode behaves like Read Committed. This is because ! it is the only sensible way to map the standard isolation levels to ! PostgreSQL's multiversion concurrency control architecture. ! ! ! ! The table also shows that PostgreSQL's Repeatable Read implementation ! does not allow phantom reads. Stricter behavior is permitted by the ! SQL standard: the four isolation levels only define which phenomena ! must not happen, not which phenomena must happen. ! The behavior of the available isolation levels is detailed in the ! following subsections. --uAKRQypu60I7Lcqm Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --uAKRQypu60I7Lcqm--