diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 2713883..7d1ee4e 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -406,26 +406,23 @@ The reason that periodic vacuuming solves the problem is that - VACUUM will mark rows as frozen, indicating that + VACUUM will mark rows as frozen (by setting appropriate hint bits), indicating that they were inserted by a transaction which committed sufficiently far in the past that the effects of the inserting transaction is certain to be visible, from an MVCC perspective, to all current and future transactions. - PostgreSQL reserves a special XID, - FrozenTransactionId, which does not follow the normal XID - comparison rules and is always considered older - than every normal XID. Normal XIDs are + Usually XIDs are compared using modulo-232 arithmetic. This means - that for every normal XID, there are two billion XIDs that are + that for every 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 + way to say it is that the XID space is circular with no endpoint. Therefore, once a row version has been created with a particular - normal XID, the row version will appear to be in the past for - the next two billion transactions, no matter which normal XID we are - talking about. If the row version still exists after more than two billion + XID, the row version will appear to be in the past for + the next two billion transactions. + If the row version still exists after more than two billion transactions, it will suddenly appear to be in the future. To - prevent this, frozen row versions are treated as if the inserting XID were - FrozenTransactionId, so that they will appear to be - in the past to all normal transactions regardless of wraparound + prevent this, usual visibility rules are not applied to frozen row versions. + Instead they are considered to be + in the past to all transactions regardless of wraparound issues, and so such row versions will be valid until deleted, no matter how long that is.