From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Wells Oliver <wells.oliver@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Faster pg_resore with autovacuum off?
Date: Sat, 27 Jul 2024 16:27:15 +0200
Message-ID: <4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at> (raw)
In-Reply-To: <CAOC+FBXP+xQ5fXbqpS-JTKq1D90DSxd+Vzz+UYDF0mfq1bVvRQ@mail.gmail.com>
References: <CAOC+FBXP+xQ5fXbqpS-JTKq1D90DSxd+Vzz+UYDF0mfq1bVvRQ@mail.gmail.com>
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
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: laurenz.albe@cybertec.at, wells.oliver@gmail.com
Subject: Re: Faster pg_resore with autovacuum off?
In-Reply-To: <4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at>
* 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