From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Avoid Wraparound Failures
Date: Fri, 25 Mar 2022 22:56:42 -0500
Message-ID: <5b742974-2d28-f6a9-9340-96341389a1b6@gmail.com> (raw)
In-Reply-To: <CA+FWGK6HmRx8=-2wZkw-9a6a36f6iEGgAH=bN1rNicbFgzas5A@mail.gmail.com>
References: <CA+FWGK6HmRx8=-2wZkw-9a6a36f6iEGgAH=bN1rNicbFgzas5A@mail.gmail.com>
On 3/25/22 17:16, Loles wrote:
> Hi!
>
> Suppose the databases on my instance are near to have a wraparound failure.
Is this actually the case, or are you just afraid?
>
> (I think so, from what I see, but in the PostgreSQL log I haven't seen any
> warning about It yet).
>
> What do I have to do?
>
> vacuum freeze;
Kinda, but really... Heck No!!!
vacuum --freeze --jobs=`nproc` --dbname=your_db_name
That will VACUUM FREEZE every table in your database in multiple threads.
However, you only need to freeze tables getting near wraparound.
pg_class.relfrozenxid tells you which tables to worry about.
>
> better than,
>
> vacuum analyze;
VACUUM ANALYZE does a plain vacuum *plus* collects statistics for the query
analyzer. Collecting query stats has nothing to do with vacuuming or
protecting against wraparound.
>
> Or both?
>
> If the autovacuum_freeze configuration parameters have defaults values,
> should I modify any first?
>
What version are you running? Even the recently EOL versions protect from
wraparound (though it's a painful last-ditch process).
--
Angular momentum makes the world go 'round.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Avoid Wraparound Failures
In-Reply-To: <5b742974-2d28-f6a9-9340-96341389a1b6@gmail.com>
* 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