|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.135 2006/10/23 18:10:30 petere Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.136 2006/11/05 22:42:06 tgl Exp $ --> |
2 | 2 | <!--
|
3 | 3 | Documentation of the system catalogs, directed toward PostgreSQL developers
|
4 | 4 | -->
|
|
1241 | 1241 | <entry></entry>
|
1242 | 1242 | <entry>Custom <varname>vacuum_cost_limit</> parameter</entry>
|
1243 | 1243 | </row>
|
| 1244 | + |
| 1245 | + <row> |
| 1246 | + <entry><structfield>freeze_min_age</structfield></entry> |
| 1247 | + <entry><type>integer</type></entry> |
| 1248 | + <entry></entry> |
| 1249 | + <entry>Custom <varname>vacuum_freeze_min_age</> parameter</entry> |
| 1250 | + </row> |
| 1251 | + |
| 1252 | + <row> |
| 1253 | + <entry><structfield>freeze_max_age</structfield></entry> |
| 1254 | + <entry><type>integer</type></entry> |
| 1255 | + <entry></entry> |
| 1256 | + <entry>Custom <varname>autovacuum_freeze_max_age</> parameter</entry> |
| 1257 | + </row> |
1244 | 1258 | </tbody>
|
1245 | 1259 | </tgroup>
|
1246 | 1260 | </table>
|
|
1258 | 1272 | live tuples currently estimated to be in the relation.
|
1259 | 1273 | </para>
|
1260 | 1274 |
|
| 1275 | + <para> |
| 1276 | + Also, the autovacuum daemon will perform a <command>VACUUM</> operation |
| 1277 | + to prevent transaction ID wraparound if the table's |
| 1278 | + <structname>pg_class</>.<structfield>relfrozenxid</> field attains an age |
| 1279 | + of more than <structfield>freeze_max_age</> transactions, whether the table |
| 1280 | + has been changed or not. The system will launch autovacuum to perform |
| 1281 | + such <command>VACUUM</>s even if autovacuum is otherwise disabled. |
| 1282 | + See <xref linkend="vacuum-for-wraparound"> for more about wraparound |
| 1283 | + prevention. |
| 1284 | + </para> |
| 1285 | + |
1261 | 1286 | <para>
|
1262 | 1287 | Any of the numerical fields can contain <literal>-1</> (or indeed
|
1263 | 1288 | any negative value) to indicate that the system-wide default should
|
|
1266 | 1291 | <varname>autovacuum_vacuum_cost_delay</> configuration parameter,
|
1267 | 1292 | or from <varname>vacuum_cost_delay</> if the former is set to a negative
|
1268 | 1293 | value. The same applies to <structfield>vac_cost_limit</>.
|
| 1294 | + Also, autovacuum will ignore attempts to set a per-table |
| 1295 | + freeze_max_age larger than the system-wide setting (it can only be set |
| 1296 | + smaller), and the freeze_min_age value will be limited to half the |
| 1297 | + system-wide <varname>autovacuum_freeze_max_age</> setting. |
1269 | 1298 | </para>
|
1270 | 1299 |
|
1271 | 1300 | </sect1>
|
|
1633 | 1662 | </row>
|
1634 | 1663 |
|
1635 | 1664 | <row>
|
1636 |
| - <entry><structfield>relminxid</structfield></entry> |
| 1665 | + <entry><structfield>relfrozenxid</structfield></entry> |
1637 | 1666 | <entry><type>xid</type></entry>
|
1638 | 1667 | <entry></entry>
|
1639 | 1668 | <entry>
|
1640 |
| - The minimum transaction ID present in all rows in this table. This |
1641 |
| - value is used to determine the database-global |
1642 |
| - <structname>pg_database</>.<structfield>datminxid</> value. |
1643 |
| - </entry> |
1644 |
| - </row> |
1645 |
| - |
1646 |
| - <row> |
1647 |
| - <entry><structfield>relvacuumxid</structfield></entry> |
1648 |
| - <entry><type>xid</type></entry> |
1649 |
| - <entry></entry> |
1650 |
| - <entry> |
1651 |
| - The transaction ID that was used as cleaning point as of the last vacuum |
1652 |
| - operation. All rows inserted, updated or deleted in this table by |
1653 |
| - transactions whose IDs are below this one have been marked as known good |
1654 |
| - or deleted. This is used to determine the database-global |
1655 |
| - <structname>pg_database</>.<structfield>datvacuumxid</> value. |
| 1669 | + All transaction IDs before this one have been replaced with a permanent |
| 1670 | + (<quote>frozen</>) transaction ID in this table. This is used to track |
| 1671 | + whether the table needs to be vacuumed in order to prevent transaction |
| 1672 | + ID wraparound or to allow <literal>pg_clog</> to be shrunk. Zero |
| 1673 | + (<symbol>InvalidTransactionId</symbol>) if the relation is not a table. |
1656 | 1674 | </entry>
|
1657 | 1675 | </row>
|
1658 | 1676 |
|
|
2035 | 2053 | </row>
|
2036 | 2054 |
|
2037 | 2055 | <row>
|
2038 |
| - <entry><structfield>datvacuumxid</structfield></entry> |
2039 |
| - <entry><type>xid</type></entry> |
2040 |
| - <entry></entry> |
2041 |
| - <entry> |
2042 |
| - The transaction ID that was used as cleaning point as of the last vacuum |
2043 |
| - operation. All rows inserted or deleted by transaction IDs before this one |
2044 |
| - have been marked as known good or deleted. This |
2045 |
| - is used to determine when commit-log space can be recycled. |
2046 |
| - If <symbol>InvalidTransactionId</symbol>, then the minimum is unknown and can be |
2047 |
| - determined by scanning <structname>pg_class</>.<structfield>relvacuumxid</>. |
2048 |
| - </entry> |
2049 |
| - </row> |
2050 |
| - |
2051 |
| - <row> |
2052 |
| - <entry><structfield>datminxid</structfield></entry> |
| 2056 | + <entry><structfield>datfrozenxid</structfield></entry> |
2053 | 2057 | <entry><type>xid</type></entry>
|
2054 | 2058 | <entry></entry>
|
2055 | 2059 | <entry>
|
2056 |
| - The minimum transaction ID present in all tables in this database. |
2057 |
| - All rows inserted by transaction IDs before this one have been |
2058 |
| - relabeled with a permanent (<quote>frozen</>) transaction ID in this |
2059 |
| - database. This is useful to check whether a database must be |
2060 |
| - vacuumed soon to avoid transaction ID wrap-around problems. |
2061 |
| - If <symbol>InvalidTransactionId</symbol>, then the minimum is unknown and can be |
2062 |
| - determined by scanning <structname>pg_class</>.<structfield>relminxid</>. |
| 2060 | + All transaction IDs before this one have been replaced with a permanent |
| 2061 | + (<quote>frozen</>) transaction ID in this database. This is used to |
| 2062 | + track whether the database needs to be vacuumed in order to prevent |
| 2063 | + transaction ID wraparound or to allow <literal>pg_clog</> to be shrunk. |
| 2064 | + It is the minimum of the per-table |
| 2065 | + <structname>pg_class</>.<structfield>relfrozenxid</> values. |
2063 | 2066 | </entry>
|
2064 | 2067 | </row>
|
2065 | 2068 |
|
|
0 commit comments