From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Avoid Wraparound Failures |
Date: | 2022-03-26 03:56:42 |
Message-ID: | 5b742974-2d28-f6a9-9340-96341389a1b6@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2022-03-26 04:34:14 | Re: Avoid Wraparound Failures |
Previous Message | Loles | 2022-03-25 22:16:43 | Avoid Wraparound Failures |