Re: Mount options for Ext3? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Mount options for Ext3?
Date
Msg-id 28176.1043457408@sss.pgh.pa.us
Whole thread Raw
In response to Re: Mount options for Ext3?  (Kevin Brown <kevin@sysexperts.com>)
Responses Re: Mount options for Ext3?  (Kevin Brown <kevin@sysexperts.com>)
List pgsql-performance
Kevin Brown <kevin@sysexperts.com> writes:
> I suspect the answer to that is that you can safely turn off fsync
> only if the operating system will guarantee that write transactions
> from a process are actually committed in the order they arrive from
> that process.

Yeah.  We use fsync partly so that when we tell a client a transaction
is committed, it really is committed (ie, down to disk) --- but also
as a means of controlling write order.  I strongly doubt that any modern
filesystem will promise to execute writes exactly in the order issued,
unless prodded by means such as fsync.

> Otherwise you'd have to worry about write transactions
> to the transaction log committing before the writes to the data files
> during a savepoint,

Actually, the other way around is the problem.  The WAL algorithm works
so long as log writes hit disk before the data-file changes they
describe (that's why it's called write *ahead* log).

            regards, tom lane

pgsql-performance by date:

Previous
From: Noah Silverman
Date:
Subject: Re: WEIRD CRASH?!?!
Next
From: Tom Lane
Date:
Subject: Re: Having trouble with backups (was: Re: Crash Recovery)