From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron Johnson <ronljohnsonjr@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Faster pg_resore with autovacuum off?
Date: Sun, 28 Jul 2024 14:34:16 +0200
Message-ID: <567d7f791c4ac691a3f941f08cf30b5c277dddb9.camel@cybertec.at> (raw)
In-Reply-To: <CANzqJaC7WgnV74NnLraw_2siNFa6Jkb2d+S7Y9nucAxJpZnaeA@mail.gmail.com>
References: <CAOC+FBXP+xQ5fXbqpS-JTKq1D90DSxd+Vzz+UYDF0mfq1bVvRQ@mail.gmail.com>
<4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at>
<CANzqJaC7WgnV74NnLraw_2siNFa6Jkb2d+S7Y9nucAxJpZnaeA@mail.gmail.com>
On Sat, 2024-07-27 at 15:48 -0400, Ron Johnson wrote:
> > 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 100% disagree with this: autovacuum is not necessary during pg_restore
> (presuming there's only one database in the instance).
It is not necessary during restore, but it is necessary if you want to use
the database after the restore. Well, you can manually VACUUM and ANALYZE the
database, but why not do it automatically?
I think that there are very few good reasons to ever disable autovacuum, and
a restore is not among them.
> Heck, it might not even be vital if you carefully monitor the other databases
> in the instance.
?
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, ronljohnsonjr@gmail.com
Subject: Re: Faster pg_resore with autovacuum off?
In-Reply-To: <567d7f791c4ac691a3f941f08cf30b5c277dddb9.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