]> granicus.if.org Git - postgresql/commitdiff
Fix ancient docs/comments thinko: XID comparison is mod 2^32, not 2^31.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Dec 2013 17:40:00 +0000 (12:40 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Dec 2013 17:40:00 +0000 (12:40 -0500)
Pointed out by Gianni Ciolli.

doc/src/sgml/maintenance.sgml
src/backend/access/transam/transam.c

index 1a5258b9490bf95164bb7584104129c3cc5ec58d..ba8323c0946afa4aefd1d42b8b06469c3d9915a8 100644 (file)
     as <literal>FrozenXID</>.  This XID does not follow the normal XID
     comparison rules and is always considered older
     than every normal XID. Normal XIDs are
-    compared using modulo-2<superscript>31</> arithmetic. This means
+    compared using modulo-2<superscript>32</> arithmetic. This means
     that for every normal XID, there are two billion XIDs that are
     <quote>older</> and two billion that are <quote>newer</>; another
     way to say it is that the normal XID space is circular with no
index bc02f15e8688247626901fc3a146245d0a59b534..cc99cb93b31f0affcc3f46f0060075cc695fbe41 100644 (file)
@@ -305,7 +305,7 @@ TransactionIdPrecedes(TransactionId id1, TransactionId id2)
 {
        /*
         * If either ID is a permanent XID then we can just do unsigned
-        * comparison.  If both are normal, do a modulo-2^31 comparison.
+        * comparison.  If both are normal, do a modulo-2^32 comparison.
         */
        int32           diff;