pgsql: Fix full-table-vacuum request mechanism for MultiXactIds

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix full-table-vacuum request mechanism for MultiXactIds
Date: 2013-11-30 01:06:08
Message-ID: E1VmZ0a-0008H1-WF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix full-table-vacuum request mechanism for MultiXactIds

While autovacuum dutifully launched anti-multixact-wraparound vacuums
when the multixact "age" was reached, the vacuum code was not aware that
it needed to make them be full table vacuums. As the resulting
partial-table vacuums aren't capable of actually increasing relminmxid,
autovacuum continued to launch anti-wraparound vacuums that didn't have
the intended effect, until age of relfrozenxid caused the vacuum to
finally be a full table one via vacuum_freeze_table_age.

To fix, introduce logic for multixacts similar to that for plain
TransactionIds, using the same GUCs.

Backpatch to 9.3, where permanent MultiXactIds were introduced.

Andres Freund, some cleanup by Álvaro

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f54106f77e6d71cbb3fa0924095e5142341fde2b

Modified Files
--------------
src/backend/access/transam/multixact.c | 15 ++++++++
src/backend/commands/cluster.c | 13 ++++---
src/backend/commands/vacuum.c | 62 +++++++++++++++++++++++---------
src/backend/commands/vacuumlazy.c | 18 +++++++---
src/include/access/multixact.h | 2 ++
src/include/commands/vacuum.h | 5 +--
6 files changed, 87 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2013-11-30 01:06:09 pgsql: Fix a couple of bugs in MultiXactId freezing
Previous Message Tom Lane 2013-11-29 23:34:59 pgsql: Fix assorted issues in pg_ctl's pgwin32_CommandLine().