Re: initdb and fsync - Mailing list pgsql-hackers

From Noah Misch
Subject Re: initdb and fsync
Date
Msg-id 20120128045219.GB29174@tornado.leadboat.com
Whole thread Raw
In response to initdb and fsync  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: initdb and fsync  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Fri, Jan 27, 2012 at 04:19:41PM -0800, Jeff Davis wrote:
> It looks like initdb doesn't fsync all the files it creates, e.g. the
> PG_VERSION file.
> 
> While it's unlikely that it would cause any real data loss, it can be
> inconvenient in some testing scenarios involving VMs.
> 
> Thoughts? Would a patch to add a few fsync calls to initdb be accepted?

+1.  If I'm piloting "strace -f" right, initdb currently issues *no* syncs.

We'd probably, then, want a way to re-disable the fsyncs for hacker benefit.

> Is a platform-independent fsync be available at initdb time?

Not sure.

Thanks,
nm


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: cursors FOR UPDATE don't return most recent row
Next
From: "MauMau"
Date:
Subject: Re: Unreliable "pg_ctl -w start" again