pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Seiler <don@seiler.us>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: template0 needing vacuum freeze?
Date: Sat, 16 May 2020 13:44:34 -0400
Message-ID: <28983.1589651074@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHJZqBAGheciTgcKZ9J=Q=A+CdtH0LOUbtqsX8nSvBS1RKggQg@mail.gmail.com>
References: <CAHJZqBAGheciTgcKZ9J=Q=A+CdtH0LOUbtqsX8nSvBS1RKggQg@mail.gmail.com>

Don Seiler <don@seiler.us> writes:
> PG 9.6 (9.6.8). Got an alert today when template0 and template1 were both
> over 50% towards TXID wraparound. I could vacuum template1 but couldn't
> vacuum template0 without first allowing connections. This is what it looked
> like before:

template0 shouldn't really need freezing, if it's unchanged since initdb,
but the autovacuum logic doesn't know that and will periodically scan it
anyway.  That should be pretty cheap (since that DB is small and there's
not really any work to do), so we haven't considered it to be something
to prevent --- especially since it is a good safety valve in case
someone does change template0.

So it's unsurprising that the freeze age increases until autovacuum
decides to do something about it.  I'm suspicious that your alert settings
are too aggressive and are notifying you before autovacuum kicks in.
You should *not* have had to do anything manual about this, unless you
have frobbed your autovac settings to the point of brokenness.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <28983.1589651074@sss.pgh.pa.us>
Permalink:  ../28983.1589651074@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28983.1589651074@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, don@seiler.us
  Subject: Re: template0 needing vacuum freeze?
  In-Reply-To: <28983.1589651074@sss.pgh.pa.us>
  References: <CAHJZqBAGheciTgcKZ9J=Q=A+CdtH0LOUbtqsX8nSvBS1RKggQg@mail.gmail.com> <28983.1589651074@sss.pgh.pa.us>

* 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