Re: [HACKERS] Proposal : For Auto-Prewarm.

Поиск
Список
Период
Сортировка
От Beena Emerson
Тема Re: [HACKERS] Proposal : For Auto-Prewarm.
Дата
Msg-id CAOG9ApELe3YjmB2Y40cz+6JfVYS4Xa++Ac2Km5zw4OTck8YQ=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposal : For Auto-Prewarm.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: [HACKERS] Proposal : For Auto-Prewarm.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers


On Tue, Jan 24, 2017 at 1:56 PM, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
On Tue, Jan 24, 2017 at 5:07 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> I took a look at this again, and it doesn't appear to be working for me. The library is being loaded during startup, but I don't see any further activity in the log, and I don't see an autoprewarm file in $PGDATA.

Hi Jim,
Thanks for looking into this patch, I just downloaded the patch and
applied same to the latest code, I can see file " autoprewarm.save" in
$PGDATA which is created and dumped at shutdown time and an activity
is logged as below
2017-01-24 13:22:25.012 IST [91755] LOG:  Buffer Dump: saved metadata
of 59 blocks.

In my code by default, we only dump at shutdown time. If we want to
dump at regular interval then we need to set the GUC
pg_autoprewarm.buff_dump_interval to > 0. I think I am missing
something while trying to recreate the bug reported above. Can you
please let me know what exactly you mean by the library is not
working.

> There needs to be some kind of documentation change as part of this patch.
Thanks, I will add a sgml for same.

For remaining suggestions, I will try to address in my next patch
based on its feasibility.



The patch works for me too. 

Few initial comments:

1. I think the README was maintained as is from the 1st version and says pg_autoprewarm is a contrib module. It should be rewritten to pg_autoprewarm is a part of pg_prewarm module. The documentation should be added to pgprewarm.sgml instead of the README

2. buff_dump_interval could be renamed to just dump_interval or buffer_dump_interval. Also, since it is now part of pg_prewarm. I think it makes sense to have the conf parameter be: pg_prewarm.xxx instead of pg_autoprewarm.xxx

3. During startup we get the following message:

2017-01-24 16:13:57.615 IST [90061] LOG:  Num buffers : 272

I could be better written as “pg_prewarm: 272 blocks loaded from dump” or something similar.

4. Also, the message while dumping says:

2017-01-24 16:15:17.712 IST [90061] LOG:  Buffer Dump: saved metadata of 272 blocks

It would be better to write the module name in message instead of "Buffer Dump"


Thank you, 

Beena Emerson

Have a Great Day!

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

Предыдущее
От: Vladimir Rusinov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Следующее
От: Nikhil Sontakke
Дата:
Сообщение: Re: [HACKERS] Speedup twophase transactions