Re: posix_fadvise() and pg_receivexlog - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: posix_fadvise() and pg_receivexlog
Date
Msg-id CAHGQGwHhsMSxqqROA3XkUsVXXmfOcXT49YKXse=Ed3J4cezRSw@mail.gmail.com
Whole thread Raw
In response to Re: posix_fadvise() and pg_receivexlog  (didier <did447@gmail.com>)
List pgsql-hackers
On Tue, Sep 9, 2014 at 9:07 PM, didier <did447@gmail.com> wrote:
> Hi
>
>> Well, I'd like to hear someone from the field complaining that
>> pg_receivexlog is thrashing the cache and thus reducing the performance of
>> some other process. Or a least a synthetic test case that demonstrates that
>> happening.
> It's not with pg_receivexlog but it's related.
>
> On a small box without replication server connected perfs were good
> enough but not so with a replication server connected, there was 1GB
> worth of WAL sitting in RAM vs next to nothing without slave!

After WAL file is filled up and closed, it will not be re-read
if wal_level is set to minimal (i.e., neither archiving nor
replication is enabled). So, in this case, PostgreSQL advises the OS
to release any cached pages of that WAL file. But not if archiving
or replication is enabled, and then WAL file keeps being cached
even after it's closed. Probably this is the cause of what you
observed, I guess.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index
Next
From: Robert Haas
Date:
Subject: Re: WIP Patch for GROUPING SETS phase 1