From: Ravi Krishna <s.ravikrishna@aim.com>
To: bruce@momjian.us
Cc: tgl@sss.pgh.pa.us
Cc: pgsql-admin@postgresql.org
Subject: Re: WAL and O_DIRECT
Date: Thu, 14 May 2015 12:29:04 -0400
Message-ID: <14d5342006a-2108-312c5@webstg-m03.mail.aol.com> (raw)
In-Reply-To: <20150514162610.GB23739@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Thanks Bruce and Tom. That pretty much explains it.
-----Original Message-----
From: Bruce Momjian <bruce@momjian.us>
To: Ravi Krishna <s.ravikrishna@aim.com>
Cc: tgl <tgl@sss.pgh.pa.us>; pgsql-admin <pgsql-admin@postgresql.org>
Sent: Thu, May 14, 2015 12:26 pm
Subject: Re: [ADMIN] WAL and O_DIRECT
On Thu, May 14, 2015 at 12:07:04PM -0400, Ravi Krishna wrote:> >> However ourDB2 folks are raising a concern that PG WAL writes may not be crash safe, unlesswe are using> >> write back technology in SAN or SSD , which we are using.>> > What's your point exactly? If the underlying hardware does not providedurable writes, there's> > nothing PG (or DB2) can do to fix that.> > >Am I right in concluding that PG WAL writes without underlying h/w caching isnot crash proof.> Fortunately these days caching is ubiquitous in all SSD/SANtechnology. Both Oracle and DB2 always open WAL> logs in O_DIRECT. Is thisthinking outdated with modern technology which caches writes. Wonder whyOracle/DB2> are not making O_DIRECT optional. I am sure it will increase thewrite performance.Basically, O_DIRECT writes through the OS catch directlyto the storage.Postgres writes to the OS cache, then uses fsync() or anotherOS call toflush that OS write to the storage --- we just do it in twoparts.We turn off O_DIRECT for WAL writes because we know another processisgoing to read it soon, so in that case, we fall back the two-partsolutionof OS write and fsync-like OS call.-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: s.ravikrishna@aim.com, bruce@momjian.us, tgl@sss.pgh.pa.us
Subject: Re: WAL and O_DIRECT
In-Reply-To: <14d5342006a-2108-312c5@webstg-m03.mail.aol.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox