]> 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:03 +0000 (12:40 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Dec 2013 17:40:03 +0000 (12:40 -0500)
Pointed out by Gianni Ciolli.

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

index 580f6173c7b53f342e6727b96fa1817e9c2d298f..4cf4416a9e9a5d5dab270e264dffedb74725d6ed 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 0c2e2dd8247843bc21e1208a94b720439eb543db..7bc82a42ed63ac6da90068b22a90ae931e101da7 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;