pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Daniel Lagerman <spjheruur@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Impact of multixact "members" limit exceeded
Date: Thu, 14 Jun 2018 19:15:42 -0400
Message-ID: <20180614231542.wowge4p5sdob4i4u@alvherre.pgsql> (raw)
In-Reply-To: <CAAw8gvibW6PMKAuv9utBtgzZDo-sZY=1Ex1s3zDKtWYVgg2=Gw@mail.gmail.com>

On 2018-Jun-14, Daniel Lagerman wrote:

> > Set vacuum_multixact_freeze_table_age to 0 (causing all vacuums to scan
> > tables fully) and vacuum_multixact_freeze_min_age to some value like one
> > million (so that they remove most of the oldest multixacts, leaving
> > just the frontmost one million).  Then vacuum the tables with the
> > highest multixact ages.  Make sure the datminmxid advances in all
> > databases (incl. postgres template0 template1); once it has advanced,
> > the oldest member files are removed.  Don't waste time processing tables
> > with datminmxid higher than the minimum, as that won't free up any
> > member space.
> 
> Thanks, we opted to go with 1 million min and 100 million table age, the
> tables in question are all way over that anyway. We completed vacuum on all
> but two which are larger tables and I'm running Vacuum there right now
> after I also bumped the maintenance work mem a bit. As this is 9.4 I can't
> see the progress except that I noted that initialy it uses less CPU and
> once it seems to finnaly start working it uses more CPU 10%->50% but that
> is fine. So my hope is that the Vacuum completes over night.

Did you observe whether the vacuumed tables' relminmxid advance?  If it
didn't, then those vacuums are a waste of time.

Note that freeze_table_age affects when vacuum does a full table scan
vs. when it skips pages due to visibility map.  A vacuum that does a
partial scan does *not* advance the relfrozenxid / relminmxid; only
full-table scan vacuums can do that.  (Except in 9.6.)  If the
relminmxid ages are younger than your 100 million table_age, vacuum
won't do a full-table scan.

Cheers

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (9+ messages)  latest in thread

Message-ID: <20180614231542.wowge4p5sdob4i4u@alvherre.pgsql>
Permalink:  ../20180614231542.wowge4p5sdob4i4u@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180614231542.wowge4p5sdob4i4u@alvherre.pgsql

 · 

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-general@postgresql.org
  Cc: alvherre@2ndquadrant.com, spjheruur@gmail.com
  Subject: Re: Impact of multixact "members" limit exceeded
  In-Reply-To: <20180614231542.wowge4p5sdob4i4u@alvherre.pgsql>
  References: <CAAw8gvibW6PMKAuv9utBtgzZDo-sZY=1Ex1s3zDKtWYVgg2=Gw@mail.gmail.com> <20180614231542.wowge4p5sdob4i4u@alvherre.pgsql>

* 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