Re: Faster pg_resore with autovacuum off?

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Faster pg_resore with autovacuum off?
Date: 2024-07-27 17:12:49
Message-ID: CAOC+FBUrnV=7BW4C-BPtFhXY9bXoK3kNLvWwm07a==3kEiu6gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

ha, thanks, my machine is plenty strong, fit and hale, new 16 CPU/64GB RDS
instance... I was just curious if there were any performance options to
change during a restore for any gains. Seems like good reasons to avoid
disabling autovacuum, though.

On Sat, Jul 27, 2024 at 7:27 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> On Fri, 2024-07-26 at 17:57 -0700, Wells Oliver wrote:
> > Maybe it's an old wives' tale, but I swear I've read a recommendation to
> turn
> > autovacuum off when doing pg_restore into a new server.. Would it make
> the
> > restore faster? I think I've restored and then run vacuumdb + analyze,
> > but I wanted to check.
>
> If your machine is too weak to handle the combined workload of restore +
> autovacuum, that might get you something. Otherwise, you are just
> cheating:
> the restore might be faster, but the database is not usable before
> autovacuum
> and autoanalyze have proessed all restored tables.
>
> I wouldn't recommend turning autovacuum off, because it is a dangerous
> thing
> to do. If you forget to enable it, your database will be in big trouble.
>
> Yours,
> Laurenz Albe
>

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wasim Devale 2024-07-27 18:34:03 Restoration query
Previous Message Laurenz Albe 2024-07-27 14:27:15 Re: Faster pg_resore with autovacuum off?