On Fri, 2012-06-22 at 10:04 -0400, Robert Haas wrote:
> This may be a stupid question, by why is it initdb's job to fsync the
> files the server creates, rather than the server's job? Normally we
> rely on the server to make its own writes persistent.
That was my first reaction as well:
http://archives.postgresql.org/message-id/1328468000.15224.32.camel@jdavis
However, from the discussion it seems like it will be harder to do it
that way (during normal operation, a checkpoint is what syncs the files;
but as Tom points out, bootstrap mode does not). Also, I would expect
the fsyncs to be in a less-controlled pattern, so it might perform more
poorly.
Regards,Jeff Davis