Re: Disable WAL logging to speed up data loading

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com>, "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, 'Fujii Masao' <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: "ashutosh(dot)bapat(dot)oss(at)gmail(dot)com" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Disable WAL logging to speed up data loading
Date: 2020-10-28 07:18:08
Message-ID: 73c520e5083a6d7a8c5ab545a801c0679c471d92.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2020-10-28 at 04:11 +0000, osumi(dot)takamichi(at)fujitsu(dot)com wrote:
> I wrote and attached the first patch to disable WAL logging.
> This patch passes the regression test of check-world already
> and is formatted by pgindent.

Without reading the code, I have my doubts about that feature.

While it clearly will improve performance, it opens the door to
data loss. People will use it to speed up their data loads and
then be unhappy if they cannot use their backups to recover from
a problem.

What happens if you try to do archive recovery across a time where
wal_level was "none"? Will the recovery process fail, as it should,
or will you end up with data corruption?

We already have a performance-related footgun in the shape of
fsync = off. Do we want to add another one?

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2020-10-28 07:20:16 RE: Global snapshots
Previous Message Michael Paquier 2020-10-28 07:11:56 Re: [patch] Fix checksum verification in base backups for zero page headers