Teach autovacuum about multixact member wraparound.
authorRobert Haas <rhaas@postgresql.org>
Fri, 8 May 2015 16:09:14 +0000 (12:09 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 8 May 2015 16:55:14 +0000 (12:55 -0400)
commit596fb5aa73e6073bf870a9093941f937921ad4a4
treeda4c505aece0805f7ae4b8907da96eb4e5311651
parent83fbd9b59906c8543c165c738fc449af24491e63
Teach autovacuum about multixact member wraparound.

The logic introduced in commit b69bf30b9bfacafc733a9ba77c9587cf54d06c0c
and repaired in commits 669c7d20e6374850593cb430d332e11a3992bbcf and
7be47c56af3d3013955c91c2877c08f2a0e3e6a2 helps to ensure that we don't
overwrite old multixact member information while it is still needed,
but a user who creates many large multixacts can still exhaust the
member space (and thus start getting errors) while autovacuum stands
idly by.

To fix this, progressively ramp down the effective value (but not the
actual contents) of autovacuum_multixact_freeze_max_age as member space
utilization increases.  This makes autovacuum more aggressive and also
reduces the threshold for a manual VACUUM to perform a full-table scan.

This patch leaves unsolved the problem of ensuring that emergency
autovacuums are triggered even when autovacuum=off.  We'll need to fix
that via a separate patch.

Thomas Munro and Robert Haas
doc/src/sgml/maintenance.sgml
src/backend/access/transam/multixact.c
src/backend/commands/vacuum.c
src/backend/postmaster/autovacuum.c
src/include/access/multixact.h