From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: rjo_roy@yahoo.com <rjo_roy@yahoo.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Template0 datfrozenxid age is 160million and progressing
Date: Wed, 1 Aug 2018 12:20:15 -0400
Message-ID: <20180801162015.kghi6rnhmy2rdkow@alvherre.pgsql> (raw)
In-Reply-To: <20180801161227.hmblujrvstqsubow@alap3.anarazel.de>
On 2018-Aug-01, Andres Freund wrote:
> On 2018-08-01 12:07:16 -0400, Tom Lane wrote:
> > Andres Freund <andres@anarazel.de> writes:
> > > On 2018-08-01 10:24:24 -0400, Tom Lane wrote:
> > >> IMO, the action you need to take is enabling autovacuum. We've
> > >> seen many many people go down the path you are taking, and it's
> > >> generally led to no good in the end. Manual vacuuming tends
> > >> to miss stuff, and it cannot react adequately to activity spikes.
> >
> > > But it shouldn't matter here, autovacuum will start regardless, no?
> >
> > Sure, once it decides that emergency anti-wraparound vacuuming is
> > necessary. I really doubt the OP wants that to happen; it's the
> > exact opposite of non-intrusive.
>
> That's solely what would trigger it were autovacuum enabled, too? I've
> complained about "emergency anti-wraparound" beeing anything but
> emergency (they're largely unavoidable unless you manually script it),
> but they're what happen once autovacuum_freeze_max_age is reached, and
> that's the only trigger for vacuuming old relations independent of other
> activity?
With a small database like template0, it doesn't matter. The vacuuming
is going to be over before OP realizes it has happened anyway.
Certainly having it happen on a normal-sized table can become
problematic, but presumably OP has taken steps to avoid it when
disabling autovacuum (which is why only template0 is getting into
trouble.)
I think emergency vacuum should behave differently (not scan indexes,
just apply HOT page prune and clear old XIDs/multixacts), which would
make it much faster, but that's a separate line of thought (and of
development).
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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, andres@anarazel.de, tgl@sss.pgh.pa.us, rjo_roy@yahoo.com
Subject: Re: Template0 datfrozenxid age is 160million and progressing
In-Reply-To: <20180801162015.kghi6rnhmy2rdkow@alvherre.pgsql>
References: <20180801161227.hmblujrvstqsubow@alap3.anarazel.de> <20180801162015.kghi6rnhmy2rdkow@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