Re: Options for fsync?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Options for fsync?
Date: 2010-03-14 09:27:39
Message-ID: 4B9CAC0B.1030901@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A B wrote:
> Hi there!
>
> I'm trying to comprehend the current status of filesystem settings and
> PostgreSQL settings.
>
> If I run on a machine (using Linux and ext3) with no battery backed
> raid controller then I should use fsync=on and disable the write cache
> on my harddrives to avoid corruption.
>
> If I had a controller with battery, then I could use fsync=off, but I
> should still disable the write cache?
>

no, you would still want fsync on, otherwise commits are left in main
memory. fsync forces the commits to be written to the controller
cache which has the battery. most of the raid systems I've used that
battery backed cache have storage media with proper cache flushing, and
the raid controller issues the appropriate commands to insure the
on-drive buffers get flushed too. Its usually when you use cheap
desktop SATA that you can get into trouble, as long as you're using
proper server grade storage like SAS, FC, SCSI, it generally works right.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2010-03-14 14:43:21 Re: unexplained autovacuum to prevent wraparound
Previous Message A B 2010-03-14 08:54:09 Options for fsync?