Re: [RFC] Should we fix postmaster to avoid slow shutdown?

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Дата
Msg-id 53728f0c-d8e4-a3d5-8837-7a885bd16b44@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Список pgsql-hackers
On 11/23/2016 12:24 PM, Michael Paquier wrote:
> On Wed, Nov 23, 2016 at 6:15 PM, Magnus Hagander <magnus@hagander.net> wrote:
>> There's also the consideration of what to do with stats *on the standby*. If
>> we WAL log the stats file, then when it replays onthe standby, the stats
>> there will be overwritten. And stats like number of index vs seq scans on
>> the standby are still interesting and would be lost.
>
> Perhaps it would make sense to separate the stat files by type then?
> The action taken for each file depends on its type.
>

That seems reasonable. There are two types of stats - usage statistics 
(number of index scans etc.), which we probably don't need on standby, 
and statistics that we use to drive autovacuum.

This would also reduce the amount of data that we need to write to WAL, 
although I'm not sure the amount is actually a problem. I've seen 
instances with ~500MB stat files, but those were instances with hundreds 
of databases, each with many thousands of objects.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: UNDO and in-place update
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch to implement pg_current_logfile() function