Re: 9.6 and fsync=off - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: 9.6 and fsync=off
Date
Msg-id 20160429063514.GA630@toroid.org
Whole thread Raw
In response to Re: 9.6 and fsync=off  (Andres Freund <andres@anarazel.de>)
Responses Re: 9.6 and fsync=off
List pgsql-hackers
At 2016-04-28 13:44:23 -0700, andres@anarazel.de wrote:
>
> Abhijit had a patch implementing automatically running fsync whenever
> reenabled IIRC. Abhijit?

The patch I had written is attached, and it's not quite the same thing.
Here's how I originally described it in response to a question from
Robert:

    «In 20150115133245.GG5245@awork2.anarazel.de, Andres explained his
    rationale as follows:

        «What I am thinking of is that, currently, if you start the
        server for initial loading with fsync=off, and then restart it,
        you're open to data loss. So when the current config file
        setting is changed from off to on, we should fsync the data
        directory. Even if there was no crash restart.»

    That's what I tried to implement.»

I remember there was some subsequent discussion about it being better to
issue fsync during a checkpoint when we see that its value has changed,
but if I did any work on it (which I have a vague memory of), I can't
find it now. Sorry.

Do you want a patch along those lines now, or is it too late?

-- Abhijit

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: UNION ALL - Var attno
Next
From: Ashutosh Bapat
Date:
Subject: Re: UNION ALL - Var attno