|
586 | 586 | statistics in the system tables <structname>pg_class</structname> and
|
587 | 587 | <structname>pg_database</structname>. In particular,
|
588 | 588 | the <structfield>relfrozenxid</structfield> column of a table's
|
589 |
| - <structname>pg_class</structname> row contains the freeze cutoff XID that was used |
590 |
| - by the last aggressive <command>VACUUM</command> for that table. All rows |
591 |
| - inserted by transactions with XIDs older than this cutoff XID are |
592 |
| - guaranteed to have been frozen. Similarly, |
593 |
| - the <structfield>datfrozenxid</structfield> column of a database's |
| 589 | + <structname>pg_class</structname> row contains the oldest remaining unfrozen |
| 590 | + XID at the end of the most recent <command>VACUUM</command> that successfully |
| 591 | + advanced <structfield>relfrozenxid</structfield> (typically the most recent |
| 592 | + aggressive VACUUM). Similarly, the |
| 593 | + <structfield>datfrozenxid</structfield> column of a database's |
594 | 594 | <structname>pg_database</structname> row is a lower bound on the unfrozen XIDs
|
595 | 595 | appearing in that database — it is just the minimum of the
|
596 | 596 | per-table <structfield>relfrozenxid</structfield> values within the database.
|
@@ -638,7 +638,11 @@ SELECT datname, age(datfrozenxid) FROM pg_database;
|
638 | 638 | set <literal>age(relfrozenxid)</literal> to a value just a little more than the
|
639 | 639 | <varname>vacuum_freeze_min_age</varname> setting
|
640 | 640 | that was used (more by the number of transactions started since the
|
641 |
| - <command>VACUUM</command> started). If no <structfield>relfrozenxid</structfield>-advancing |
| 641 | + <command>VACUUM</command> started). <command>VACUUM</command> |
| 642 | + will set <structfield>relfrozenxid</structfield> to the oldest XID |
| 643 | + that remains in the table, so it's possible that the final value |
| 644 | + will be much more recent than strictly required. |
| 645 | + If no <structfield>relfrozenxid</structfield>-advancing |
642 | 646 | <command>VACUUM</command> is issued on the table until
|
643 | 647 | <varname>autovacuum_freeze_max_age</varname> is reached, an autovacuum will soon
|
644 | 648 | be forced for the table.
|
|
0 commit comments