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