Re: Disable WAL logging to speed up data loading - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Disable WAL logging to speed up data loading
Date
Msg-id 6a109368564942daeab6d4e93a56db8a14488de0.camel@cybertec.at
Whole thread Raw
In response to Re: Disable WAL logging to speed up data loading  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses RE: Disable WAL logging to speed up data loading  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
List pgsql-hackers
On Wed, 2020-10-28 at 14:05 +0100, I wrote:
> But what if someone sets wal_level=none, performs some data modifications,
> sets wal_level=archive and after dome more processing decides to restore from
> a backup that was taken before the cluster was set to wal_level=none?
> Then they would end up with a corrupted database, right?
> 
> I think the least this patch needs is that starting with wal_level=none emits
> a WAL record that will make recovery fail.

I just realized that changing "wal_level" will cause a WAL record anyway.
Besides, the situation is not much different from changing to "wal_level = minimal".
So as long as PostgreSQL refuses to start after a crash, we should be good.

Sorry for the noise, and I am beginning to think that this is actually
a useful feature.

Yours,
Laurenz Albe




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Internal key management system
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Add important info about ANALYZE after create Functional Index