Re: Document how to turn off disk write cache on popular operating

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Document how to turn off disk write cache on popular operating
Date: 2007-12-16 14:04:29
Message-ID: 200712161404.lBGE4Tp25565@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Magnus Hagander wrote:
> > > Should this mention that you don't need to turn it off at the disk level if
> > > you use fsync_writethrough?
> >
> > Uh, I remember we looked at this checkbox before but I don't remember
> > the details, and I can't find a comment about it. Was the issue that
> > writethrough always forces through the disk cache? Is that the default
> > on Win32? Did we comment this somewhere?
>
> If you set it to fsync or fsync_writethrough it will write through the
> cache. (fsync is just an alias)
> If you set it to OPEN_DATASYNC, it will respond to the checkbox you are
> referring to.
>
> OPEN_DATASYNC is the default, IIRC.

OK, docs updated:

On <productname>Windows</> if <varname>wal_sync_method</> is
<literal>open_datasync</> (the default), write caching is disabled by
unchecking <literal>My Computer\Open\{select disk
drive}\Properties\Hardware\Properties\Policies\Enable write caching on
the disk</>. Also on Windows, <literal>fsync</> and
<literal>fsync_writethrough</> never do write caching.

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

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2007-12-16 14:05:12 pgsql: Windows write-cache wording improvement.
Previous Message Bruce Momjian 2007-12-16 14:03:32 pgsql: Update write-cache docs to mention windows behavior for various

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Sullivan 2007-12-16 14:14:47 Re: Negative LIMIT and OFFSET?
Previous Message Bruce Momjian 2007-12-16 13:09:43 Re: Release Note Changes