Skip site navigation (1) Skip section navigation (2)

pgsql: Don't use O_DIRECT when writing WAL files if archiving or

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't use O_DIRECT when writing WAL files if archiving or
Date: 2010-02-19 10:51:04
Message-ID: 20100219105104.4095B7541C5@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Don't use O_DIRECT when writing WAL files if archiving or streaming is
enabled. Bypassing the kernel cache is counter-productive in that case,
because the archiver/walsender process will read from the WAL file
soon after it's written, and if it's not cached the read will cause
a physical read, eating I/O bandwidth available on the WAL drive.

Also, walreceiver process does unaligned writes, so disable O_DIRECT
in walreceiver process for that reason too.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xlog.c (r1.376 -> r1.377)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.376&r2=1.377)
    pgsql/src/backend/replication:
        walreceiver.c (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiver.c?r1=1.4&r2=1.5)
    pgsql/src/include/access:
        xlogdefs.h (r1.25 -> r1.26)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlogdefs.h?r1=1.25&r2=1.26)
    pgsql/src/include/replication:
        walreceiver.h (r1.6 -> r1.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/replication/walreceiver.h?r1=1.6&r2=1.7)

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-02-19 10:51:14
Subject: Re: Re: [COMMITTERS] pgsql: Introduce WAL records to log reuse of btree pages, allowing
Previous:From: David FetterDate: 2010-02-19 07:02:04
Subject: Re: pgsql: First pass over client applications documentation proofreading.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group