Fix recently-understood problems with handling of XID freezing, particularly

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 48188e1621bb6711e7d092bee48523b18cd80177
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-11-05T22:42:10Z
Releases: 8.2.0
Fix recently-understood problems with handling of XID freezing, particularly
in PITR scenarios.  We now WAL-log the replacement of old XIDs with
FrozenTransactionId, so that such replacement is guaranteed to propagate to
PITR slave databases.  Also, rather than relying on hint-bit updates to be
preserved, pg_clog is not truncated until all instances of an XID are known to
have been replaced by FrozenTransactionId.  Add new GUC variables and
pg_autovacuum columns to allow management of the freezing policy, so that
users can trade off the size of pg_clog against the amount of freezing work
done.  Revise the already-existing code that forces autovacuum of tables
approaching the wraparound point to make it more bulletproof; also, revise the
autovacuum logic so that anti-wraparound vacuuming is done per-table rather
than per-database.  initdb forced because of changes in pg_class, pg_database,
and pg_autovacuum catalogs.  Heikki Linnakangas, Simon Riggs, and Tom Lane.

Files

PathChange+/−
doc/src/sgml/catalogs.sgml modified +43 −40
doc/src/sgml/config.sgml modified +44 −2
doc/src/sgml/maintenance.sgml modified +128 −112
doc/src/sgml/manage-ag.sgml modified +1 −14
doc/src/sgml/ref/vacuum.sgml modified +15 −18
src/backend/access/heap/heapam.c modified +296 −1
src/backend/access/transam/clog.c modified +61 −13
src/backend/access/transam/rmgr.c modified +2 −2
src/backend/access/transam/varsup.c modified +64 −18
src/backend/access/transam/xact.c modified +6 −2
src/backend/access/transam/xlog.c modified +1 −31
src/backend/catalog/heap.c modified +27 −32
src/backend/commands/analyze.c modified +3 −3
src/backend/commands/dbcommands.c modified +11 −18
src/backend/commands/vacuum.c modified +172 −318
src/backend/commands/vacuumlazy.c modified +48 −75
src/backend/libpq/hba.c modified +4 −10
src/backend/nodes/copyfuncs.c modified +2 −2
src/backend/nodes/equalfuncs.c modified +2 −2
src/backend/parser/gram.y modified +6 −6
src/backend/postmaster/autovacuum.c modified +180 −235
src/backend/postmaster/postmaster.c modified +19 −11
src/backend/storage/ipc/procarray.c modified +4 −2
src/backend/utils/init/flatfiles.c modified +16 −20
src/backend/utils/init/postinit.c modified +3 −4
src/backend/utils/misc/guc.c modified +19 −1
src/backend/utils/misc/postgresql.conf.sample modified +3 −0
src/backend/utils/time/tqual.c modified +6 −4
src/include/access/clog.h modified +2 −1
src/include/access/heapam.h modified +11 −3
src/include/access/htup.h modified +19 −1
src/include/access/rmgr.h modified +5 −1
src/include/access/transam.h modified +6 −3
src/include/access/xlog.h modified +1 −2
src/include/catalog/catversion.h modified +2 −2
src/include/catalog/pg_attribute.h modified +7 −9
src/include/catalog/pg_autovacuum.h modified +12 −8
src/include/catalog/pg_class.h modified +14 −15
src/include/catalog/pg_database.h modified +8 −10
src/include/commands/vacuum.h modified +5 −5
src/include/libpq/hba.h modified +2 −3
src/include/nodes/parsenodes.h modified +2 −2
src/include/postmaster/autovacuum.h modified +2 −1