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

From Michael Paquier
Subject Re: Disable WAL logging to speed up data loading
Date
Msg-id X+x66SzrQmGk+Ysy@paquier.xyz
Whole thread Raw
In response to Re: Disable WAL logging to speed up data loading  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Disable WAL logging to speed up data loading
RE: Disable WAL logging to speed up data loading
List pgsql-hackers
On Mon, Dec 28, 2020 at 11:06:30AM +0000, Simon Riggs wrote:
> Agreed, it is a footgun. -1 to commit the patch as-is.
>
> The patch to avoid WAL is simple but it is dangerous for both the user
> and the PostgreSQL project.

Something that has not been mentioned on this thread is that if you
could also put pg_wal/ on a RAM disk.  That's similarly unsafe, of
course, but it does not require any extra upstream patching, and that
should be really fast for the case of this thread.  If you care about
consistency, there are solutions like PMEM that we could look more
into.

> In my experience, people will use this option and when it crashes and
> they lose their data, they will claim PostgreSQL broke and that they
> were not stupid enough to use this option. Data loss has always been
> the most serious error for PostgreSQL and our reputation for
> protecting data has been hard won; it can easily be lost in a moment
> of madness. Please consider how the headlines will read, bearing in
> mind past incidents and negative press.

Yeah..

> Yes, we did think of this feature already and rejected it.

I don't recall seeing such a discussion.  Do you have some references?
Just a matter of curiosity :)
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Fail Fast In CTAS/CMV If Relation Already Exists To Avoid Unnecessary Rewrite, Planning Costs
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions