pgsql: Fix corner case in autovacuum-forcing logic for multixact wrapar

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix corner case in autovacuum-forcing logic for multixact wrapar
Date: 2015-06-19 15:41:14
Message-ID: E1Z5yPq-0003uV-54@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix corner case in autovacuum-forcing logic for multixact wraparound.

Since find_multixact_start() relies on SimpleLruDoesPhysicalPageExist(),
and that function looks only at the on-disk state, it's possible for it
to fail to find a page that exists in the in-memory SLRU that has not
been written yet. If that happens, SetOffsetVacuumLimit() will
erroneously decide to force emergency autovacuuming immediately.

We should probably fix find_multixact_start() to consider the data
cached in memory as well as on the on-disk state, but that's no excuse
for SetOffsetVacuumLimit() to be stupid about the case where it can
no longer read the value after having previously succeeded in doing so.

Report by Andres Freund.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6199b1f90c5c3b800fa4d647e333c194ae4ee933

Modified Files
--------------
src/backend/access/transam/multixact.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-06-19 15:42:17 pgsql: Fix bogus range_table_mutator() logic for RangeTblEntry.tablesam
Previous Message Robert Haas 2015-06-19 15:14:00 pgsql: Add PASSWORD to tab completions for CREATE/ALTER ROLE/USER/GROUP