pgsql: Teach autovacuum about multixact member wraparound.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach autovacuum about multixact member wraparound.
Date: 2015-05-08 17:00:34
Message-ID: E1Yqlda-0008At-AK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/53bb309d2d5a9432d2602c93ed18e58bd2924e15

Modified Files
--------------
doc/src/sgml/maintenance.sgml | 8 ++-
src/backend/access/transam/multixact.c | 88 ++++++++++++++++++++++++++++++++
src/backend/commands/vacuum.c | 16 ++++--
src/backend/postmaster/autovacuum.c | 28 +++++++---
src/include/access/multixact.h | 1 +
5 files changed, 130 insertions(+), 11 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2015-05-08 17:23:16 Re: pgsql: Teach autovacuum about multixact member wraparound.
Previous Message Tom Lane 2015-05-08 15:27:14 Re: [COMMITTERS] pgsql: Add transforms feature

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-05-08 17:23:16 Re: pgsql: Teach autovacuum about multixact member wraparound.
Previous Message Andres Freund 2015-05-08 16:52:46 Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0