pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Scott Ribe <scott_ribe@elevated-dev.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Faster pg_resore with autovacuum off?
Date: Sun, 28 Jul 2024 14:40:32 +0200
Message-ID: <e8a5593d5310ea187aaf213e7a5791127c304308.camel@cybertec.at> (raw)
In-Reply-To: <154A742E-51A3-4A56-A570-65B9E6A14A4D@elevated-dev.com>
References: <CAOC+FBXP+xQ5fXbqpS-JTKq1D90DSxd+Vzz+UYDF0mfq1bVvRQ@mail.gmail.com>
	<4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at>
	<CANzqJaC7WgnV74NnLraw_2siNFa6Jkb2d+S7Y9nucAxJpZnaeA@mail.gmail.com>
	<154A742E-51A3-4A56-A570-65B9E6A14A4D@elevated-dev.com>

On Sat, 2024-07-27 at 14:05 -0600, Scott Ribe wrote:
> Similar argument applies to turning off fsync, which I have found to sometimes make a
> significant difference (depending on hardware).

That's bad advice.  Very bad advice.
That is, unless you are ready to delete the cluster and run a new "initdb" after an OS crash.

But why risk that, if you can get virtually the same positive effect by disabling
"synchronous_commit".  But all that shouldn't have a big effect on "pg_restore".
To tune "pg_restore", increate "max_wal_size", "checkpoint_timeout" and "maintenance_work_mem".

> The other argument I've seen, that if there's a crash during restore you'll have a
> corrupted database, is bogus. What are you going to try to do with a database if there's
> a crash during restore???

Drop it?
You are wrong: it is not the database that is broken after a crash, but the entire cluster.

Yours,
Laurenz Albe





view thread (15+ messages)  latest in thread

Message-ID: <e8a5593d5310ea187aaf213e7a5791127c304308.camel@cybertec.at>
Permalink:  ../e8a5593d5310ea187aaf213e7a5791127c304308.camel@cybertec.at/
Also on:    postgresql.org/message-id/e8a5593d5310ea187aaf213e7a5791127c304308.camel@cybertec.at

 · 

reply

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, scott_ribe@elevated-dev.com
  Subject: Re: Faster pg_resore with autovacuum off?
  In-Reply-To: <e8a5593d5310ea187aaf213e7a5791127c304308.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