Skip site navigation (1) Skip section navigation (2)

Re: initdb and fsync

From: Noah Misch <noah(at)leadboat(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: initdb and fsync
Date: 2012-01-28 04:52:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


In response to


pgsql-hackers by date

Next:From: MauMauDate: 2012-01-28 07:05:30
Subject: Re: Unreliable "pg_ctl -w start" again
Previous:From: Tom LaneDate: 2012-01-28 04:35:33
Subject: Re: cursors FOR UPDATE don't return most recent row

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group