Re: PG 9.2 slave restarted - cache not impacted

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: PG 9.2 slave restarted - cache not impacted
Дата
Msg-id 20201023031959.GB5180@paquier.xyz
обсуждение исходный текст
Ответ на PG 9.2 slave restarted - cache not impacted  (Lucas Possamai <drum.lucas@gmail.com>)
Список pgsql-general
On Fri, Oct 23, 2020 at 11:23:20AM +1300, Lucas Possamai wrote:
> I'm a bit confused about PG cache.
>
> I have a PostgreSQL 9.2 cluster (yes, we're planning on upgrading it to 12)
> with a master and a slave database.
>
> The application is sending all read requests to the slave, where the master
> processes the writes.
>
> A while ago we had to restart the master database server, and the
> application was slow for a couple of days while PG cache was warmed up.
> Yesterday, we had to restart the slave database server and we did not have
> the same problem.
>
> I would like to understand why?

Perhaps you misunderstood the effects of the OS cache and the Postgres
shared buffers?  On restart the cluster discards the shared buffers
internal to Postgres.  It does not mean that the OS cache is changed,
and it matters a lot in terms of performance.  By the way, if you want
to warm up your caches faster, an option you can consider with 9.2
(which is a version not officially supported by the community by the
way so please upgrade) would be to use pgfincore.
--
Michael

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Lucas Possamai
Дата:
Сообщение: PG 9.2 slave restarted - cache not impacted
Следующее
От: Philip Semanchuk
Дата:
Сообщение: Re: postgres materialized view refresh performance