pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Josh Berkus <josh@agliodbs.com>
Cc: Greg Smith <greg@2ndquadrant.com>
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Date: Wed, 17 Nov 2010 02:12:29 +0100
Message-ID: <201011170212.30033.andres@anarazel.de> (raw)
In-Reply-To: <11113.1289955868@sss.pgh.pa.us>
References: <AANLkTi=n3zxiLNFhbpiN=JPQPwB=BhXf9iepw1KOEs8U@mail.gmail.com>
	<201011170201.24782.andres@anarazel.de>
	<11113.1289955868@sss.pgh.pa.us>

On Wednesday 17 November 2010 02:04:28 Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On Wednesday 17 November 2010 01:51:28 Tom Lane wrote:
> >> Well, there's a forced fsync after writing the last page of an xlog
> >> file, but I don't believe that proves that more than 16MB of xlog
> >> buffers is useless.  Other processes could still be busy filling the
> >> buffers.
> > 
> > Maybe I am missing something, but I think the relevant
> > AdvanceXLInsertBuffer() is currently called with WALInsertLock held?
> 
> The fsync is associated with the write, which is not done with insert
> lock held.  We're not quite that dumb.
Ah, I see. The XLogWrite in AdvanceXLInsertBuffer is only happening if the head 
of the buffer gets to the tail - which is more likely if the wal buffers are 
small...

Andres




view thread (46+ messages)  latest in thread

Message-ID: <201011170212.30033.andres@anarazel.de>
Permalink:  ../201011170212.30033.andres@anarazel.de/
Also on:    postgresql.org/message-id/201011170212.30033.andres@anarazel.de

 · 

reply

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-performance@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, josh@agliodbs.com, greg@2ndquadrant.com
  Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
  In-Reply-To: <201011170212.30033.andres@anarazel.de>

* 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