Re: template0 needing vacuum freeze? - Mailing list pgsql-general

From Tom Lane
Subject Re: template0 needing vacuum freeze?
Date
Msg-id 28983.1589651074@sss.pgh.pa.us
Whole thread Raw
In response to template0 needing vacuum freeze?  (Don Seiler <don@seiler.us>)
Responses Re: template0 needing vacuum freeze?  (Don Seiler <don@seiler.us>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Michael Nolan
Date:
Subject: Re: Removing Last field from CSV string
Next
From: Don Seiler
Date:
Subject: Re: template0 needing vacuum freeze?