From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ravi Krishna <s.ravikrishna@aim.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: WAL and O_DIRECT
Date: Thu, 14 May 2015 11:11:32 -0400
Message-ID: <20588.1431616292@sss.pgh.pa.us> (raw)
In-Reply-To: <14d52f362c9-2108-309cd@webstg-m03.mail.aol.com>
References: <14d52f362c9-2108-309cd@webstg-m03.mail.aol.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Ravi Krishna <s.ravikrishna@aim.com> writes:
> Why is O_DIRECT not used, despite the documentation mentioning otherwise?
You've not shown us all your settings, but this comment in xlog.c might
explain it:
* Optimize writes by bypassing kernel cache with O_DIRECT when using
* O_SYNC/O_FSYNC and O_DSYNC. But only if archiving and streaming are
* disabled, otherwise the archive command or walsender process will read
* the WAL soon after writing it, which is guaranteed to cause a physical
* read if we bypassed the kernel cache. We also skip the
* posix_fadvise(POSIX_FADV_DONTNEED) call in XLogFileClose() for the same
* reason.
regards, tom lane
--
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: tgl@sss.pgh.pa.us, s.ravikrishna@aim.com
Subject: Re: WAL and O_DIRECT
In-Reply-To: <20588.1431616292@sss.pgh.pa.us>
* 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