Re: To keep indexes in memory, is large enough effective_cache_size enough? - Mailing list pgsql-performance

From David Rowley
Subject Re: To keep indexes in memory, is large enough effective_cache_size enough?
Date
Msg-id CAKJS1f83CDUbv-vcOMpHj8=UfUpx7UTT2=9P_yj6H2BLEEKzOQ@mail.gmail.com
Whole thread Raw
In response to Re: To keep indexes in memory, is large enough effective_cache_size enough?  (Wei Shan <weishan.ang@gmail.com>)
List pgsql-performance
On 20 September 2018 at 15:19, Wei Shan <weishan.ang@gmail.com> wrote:
> I believe you can use pg_prewarm to pin index or table to cache.
>
> https://www.postgresql.org/docs/current/static/pgprewarm.html

I think the key sentence in the document you linked to is:

"Prewarmed data also enjoys no special protection from cache
evictions, so it is possible that other system activity may evict the
newly prewarmed blocks shortly after they are read"

So this is not pinning. It's merely loading buffers into shared
buffers in the hope that they might be around long enough for you to
make the most of that effort.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-performance by date:

Previous
From: Wei Shan
Date:
Subject: Re: To keep indexes in memory, is large enough effective_cache_size enough?
Next
From: Vladimir Ryabtsev
Date:
Subject: Why could different data in a table be processed with different performance?