Re: no universally correct setting for fsync

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Tharp <gxti(at)partiallystapled(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: no universally correct setting for fsync
Date: 2010-05-10 15:12:35
Message-ID: 201005101512.o4AFCZS27089@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Michael Tharp wrote:
> On 05/08/2010 04:07 AM, Craig Ringer wrote:
> > It's probably worth mentioning that people who want to turn off fsync to
> > gain a performance boost should instead look at a RAID controller with a
> > BBU so they can safely enable write-back caching, getting most of the
> > benefits of fsync=off safely.
>
> Which options specifically should be set if a BBU is in use? Obviously
> fsync should be on always, but can full_page_writes be disabled? Are
> there other tweaks that can be done?
>
> It would be great to see some practical hints in the documentation while
> the fsync part is getting changed.

Uh, our docs have:

Turning this parameter off speeds normal operation, but might
lead to a corrupt database after an operating system crash or
power failure. The risks are similar to turning off
<varname>fsync</>, though smaller. It might be safe to turn
off this parameter if you have hardware (such as a battery-backed
disk controller) or file-system software that reduces the risk
of partial page writes to an acceptably low level (e.g., ZFS).

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Robert Haas 2010-05-10 15:41:22 Re: no universally correct setting for fsync
Previous Message Michael Tharp 2010-05-10 14:48:01 Re: no universally correct setting for fsync

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Rylander 2010-05-10 15:22:20 Re: max_standby_delay considered harmful
Previous Message Bruce Momjian 2010-05-10 15:07:35 Re: max_standby_delay considered harmful