pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix corner case in autovacuum-forcing logic for multixact wrapar
Date: Fri, 19 Jun 2015 15:41:14 +0000
Message-ID: <E1Z5yPq-0003uR-4q@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
------
master

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

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


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (3+ messages)  latest in thread

Message-ID: <E1Z5yPq-0003uR-4q@gemulon.postgresql.org>
Permalink:  ../E1Z5yPq-0003uR-4q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Z5yPq-0003uR-4q@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Fix corner case in autovacuum-forcing logic for multixact wrapar
  In-Reply-To: <E1Z5yPq-0003uR-4q@gemulon.postgresql.org>
  References: <E1Z5yPq-0003uR-4q@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox