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

Re: Free WAL caches on switching segments

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Free WAL caches on switching segments
Date: 2006-02-13 17:56:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > ITAGAKI Takahiro wrote:
> >> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> >>> I looked this over and I am unsure what this does for us that isn't
> >>> already accomplished using the wal_sync_method settings.  See xlog.c for
> >>> a description of O_DIRECT and when it is used.
> >> 
> >> I proposed it to supplement the cache control. There are some OSes that
> >> supports posix_fadvise but not O_DIRECT, for example, NetBSD 4.0
> >> (
> > Oh, that makes sense then.   Let me re-add it to the queue.
> Could we see some performance measurements *from those OSes*?  The given
> test on Linux certainly does not justify adding another operating
> system dependency to the WAL code.  For that matter, even if it is a big
> win on some versions of NetBSD, I'm not sure I'd want to accept it ...
> how many NetBSD users do we have who would care?
> Depending on OS features we have never depended on before is a *huge*
> ongoing maintenance cost, and I have not seen an argument that I think
> justifies this one.

I disagree.  It is a localized change and seems like a win, and it uses
a standard POSIX feature, rather than an OS-specific one.

I fact the patch cleans up our code by centralizing the WAL close() code
and error message.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2006-02-13 18:09:34
Subject: Re: Free WAL caches on switching segments
Previous:From: Tom LaneDate: 2006-02-13 16:47:58
Subject: Re: Free WAL caches on switching segments

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