Re: Re: [HACKERS] Wal sync odirect

From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Миша Тюрин <tmihail(at)bk(dot)ru>
Subject: Re: Re: [HACKERS] Wal sync odirect
Date: 2013-07-22 14:40:35
Message-ID: 201307221640.35989.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le lundi 22 juillet 2013 09:39:50, Craig Ringer a écrit :
> On 07/22/2013 03:30 PM, Миша Тюрин wrote:
> >
> > i tell about wal_level is higher than MINIMAL
>
> OK, so you want to be able to force O_DIRECT for wal_level = archive ?
>
> I guess that makes sense if you expect the archive_command to read the
> file out of the RAID controller's write cache before it gets flushed and
> your archive_command can also use direct I/O to avoid pulling it into cache.
>
> You already know where to change to start experimenting with this. What
> exactly are you trying to ask? I don't see any risk in forcing O_DIRECT
> for higher wal_level, but I'm not an expert in WAL and recovery. I'd
> recommend testing on a non-critical PostgreSQL instance.

IIRC there is also some fadvise() call to flush the buffer cache when using
'minimal', but not when using archiving of WAL.
I'm unsure how this has been tunned with streaming replication addition.

see xlog.c|h

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-07-22 15:13:30 Re: changeset generation v5-01 - Patches & git tree
Previous Message Greg Stark 2013-07-22 13:59:58 Re: Using ini file to setup replication