docs: add "serialization anomaly" to transaction isolation table
authorBruce Momjian
Mon, 11 May 2015 16:02:10 +0000 (12:02 -0400)
committerBruce Momjian
Mon, 11 May 2015 16:02:10 +0000 (12:02 -0400)
Also distinguish between SQL-standard and Postgres behavior.

Report by David G. Johnston

doc/src/sgml/mvcc.sgml

index 313198800cbcfd044356b31ca2bd9db0c1689caf..385691e21ed08aa428a22ec7f9749f24c9754b38 100644 (file)
        
       
      
+
+     
+      
+       serialization anomaly
+       serialization anomaly
+      
+     
+      
+        The result of successfully committing a group of transactions
+        is inconsistent with all possible orderings of running those
+        transactions one at a time.
+       
+      
+     
     
    
 
     
      transaction isolation level
     
-    The four transaction isolation levels and the corresponding
-    behaviors are described in .
+    The SQL standard and PostgreSQL-implemented transaction isolation levels
+    are described in .
    
 
     
-     <span class="marked">Standard <acronym>SQL</acronym> </span>Transaction Isolation Levels
-     4">
+     Transaction Isolation Levels
+     5">
       
        
         
         
          Phantom Read
         
+        
+         Serialization Anomaly
+        
        
       
       
         
          Read uncommitted
         
+        
+         Allowed, but not in PG
+        
         
          Possible
         
         
          Possible
         
+        
+         Possible
+        
        
 
        
         
          Not possible
         
+        
+         Allowed, but not in PG
+        
         
          Possible
         
         
          Not possible
         
+        
+         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.
+    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.