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

Re: initdb and fsync

From: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: initdb and fsync
Date: 2012-02-04 21:20:05
Message-ID: 87y5sinvne.fsf@mid.deneb.enyo.de (view raw or flat)
Thread:
Lists: pgsql-hackers
* Tom Lane:

> I wonder whether it wouldn't be sufficient to call sync(2) at the end,
> anyway, rather than cluttering the entire initdb codebase with fsync
> calls.

We tried to do this in the Debian package mananger.  It works as
expected on Linux systems, but it can cause a lot of data to hit the
disk, and there are kernel versions where sync(2) never completes if
the system is rather busy.

initdb is much faster with 9.1 than with 8.4.  It's so fast that you
can use it in test suites, instead of reusing an existing cluster.
I think this is a rather desirable property.

In response to

pgsql-hackers by date

Next:From: Jeff DavisDate: 2012-02-04 23:41:27
Subject: Re: initdb and fsync
Previous:From: Bridget FreyDate: 2012-02-04 19:52:09
Subject: Re: BUG #6425: Bus error in slot_deform_tuple

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