doing also VM cache snapshot and restore with pg_prewarm, having more information of the VM inside PostgreSQL

Поиск
Список
Период
Сортировка
От Cedric Villemain
Тема doing also VM cache snapshot and restore with pg_prewarm, having more information of the VM inside PostgreSQL
Дата
Msg-id aa94afb9-0bfe-4421-b8b4-8a6e67ce55b1@abcSQL.com
обсуждение исходный текст
Список pgsql-hackers

Hi,

for 15 years pgfincore has been sitting quietly and being used in large setups to help in HA and resources management.
It can perfectly stay as is, to be honest I was expecting to one day include a windows support and propose that to PostgreSQL, it appears getting support on linux and BSD is more than enough today.

So I wonder if there are interest for having virtual memory snapshot and restore operations with, for example, pg_prewarm/autowarm ?

Some usecases covered: snapshot/restore cache around cronjobs, around dumps, switchover, failover, on stop/start of postgres (think kernel upgrade with a cold restart), ...

pgfincore also provides some nice information with mincore (on FreeBSD mincore is more interesting) or cachestat, again it can remain as an out of tree extension but I will be happy to add to commitfest if there are interest from the community.
An example of cachestat output:

postgres=# select *from vm_relation_cachestat('foo',range:=1024*32);
block_start | block_count | nr_pages | nr_cache | nr_dirty | nr_writeback | nr_evicted | nr_recently_evicted  
-------------+-------------+----------+----------+----------+--------------+------------+---------------------
          0 |       32768 |    65536 |    62294 |        0 |            0 |       3242 |                3242
      32768 |       32768 |    65536 |    39279 |        0 |            0 |      26257 |               26257
      65536 |       32768 |    65536 |    22516 |        0 |            0 |      43020 |               43020
      98304 |       32768 |    65536 |    24944 |        0 |            0 |      40592 |               40592
     131072 |        1672 |     3344 |      487 |        0 |            0 |       2857 |                2857


Comments?

---
Cédric Villemain +33 (0)6 20 30 22 52
https://Data-Bene.io
PostgreSQL Expertise, Support, Training, R&D

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_upgrade and logical replication
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Add a perl function in Cluster.pm to generate WAL