Fix ancient docs/comments thinko: XID comparison is mod 2^32, not 2^31.
authorTom Lane
Thu, 12 Dec 2013 17:39:57 +0000 (12:39 -0500)
committerTom Lane
Thu, 12 Dec 2013 17:39:57 +0000 (12:39 -0500)
Pointed out by Gianni Ciolli.

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

index e9b8f97ae531af74c80e6c49ff4d5d0315df8bd8..3577418a16253b3417112757cfa1f321bd1d64fe 100644 (file)
     as 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-231 arithmetic. This means
+    compared using modulo-232 arithmetic. This means
     that for every normal XID, there are two billion XIDs that are
     older and two billion that are newer; another
     way to say it is that the normal XID space is circular with no
index a7214cf34dedf7ffbb01f50f4dedbb8d50c8a1cd..833f3cd1cc7bbc95236f18807a9fca120e2be1d5 100644 (file)
@@ -304,7 +304,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;