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 18:13:58
Message-ID: 200602131813.k1DIDwk03860@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> 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.
> 
> It's still gonna need a configure test and so on.  "POSIX" does not mean
> "exists everywhere".  Moreover, the submitter has not even proven that
> the code works (or even builds, much less does anything useful) on the
> platforms it's supposedly for.

The submitter believes the C macro test is sufficient:

	I think we can use _POSIX_ADVISORY_INFO to test if posix_fadvise exists.
	Also, I added the check on whether WAL archiving is enabled, because
	archivers might use the caches to read the WAL segment.

I assume if it follows the POSIX spec it will work on all platforms that
support this feature.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  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

Responses

pgsql-patches by date

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

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