Re: initdb and fsync - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: initdb and fsync
Date
Msg-id 1340443065.10342.23.camel@jdavis
Whole thread Raw
In response to Re: initdb and fsync  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Allow WAL information to recover corrupted pg_controldata
Next
From: "Dickson S. Guedes"
Date:
Subject: Re: COMMUTATOR doesn't seem to work