Re: Free WAL caches on switching segments

Поиск
Список
Период
Сортировка
Искать
От
ITAGAKI Takahiro
Тема
Re: Free WAL caches on switching segments
Дата
Msg-id
20060112135902.4D32.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Ответ на
Список
Дерево обсуждения
Free WAL caches on switching segments ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments daveg <daveg@sonic.net>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Simon Riggs <simon@2ndquadrant.com>
Re: Free WAL caches on switching segments Simon Riggs <simon@2ndquadrant.com>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Mark Kirkwood <markir@paradise.net.nz>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Mark Kirkwood <markir@paradise.net.nz>
Re: Free WAL caches on switching segments Tom Lane <tgl@sss.pgh.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Mark Kirkwood <markir@paradise.net.nz>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Re: Free WAL caches on switching segments Bruce Momjian <pgman@candle.pha.pa.us>
Bruce Momjian  wrote:

> > > > Here is a small patch to prevent undesired WAL file caching by kernel.
> > > > posix_fadvise(POSIX_FADV_DONTNEED) attempts to free cached pages and
> > > > the kernel will discard them in preference to other data caches.
> > > 
> > > On plenty of platforms, this won't even compile ...
> 
> Yes, but we probably have to have a configure test to see if
> posix_fadvise exists too.  I will keep this for 8.2.

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.


By the way, should we put posix_fadvise on the separated place with renaming
pg_fadvise? If we use posix_fadvise in other purposes, for example,
read-ahead control, the separation would be good to keep codes clean.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories

В списке pgsql-patches по дате отправления
От: Tom Lane
Дата:
От: Neil Conway
Дата:
FAQ