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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Дата
Msg-id b236f233-5856-7522-9e90-32c2c788f4f0@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [RFC] Should we fix postmaster to avoid slow shutdown?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Ответы Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Список pgsql-hackers
On 9/27/16 11:07 PM, Tsunakawa, Takayuki wrote:
>> From: pgsql-hackers-owner@postgresql.org
>> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Tom Lane
>> Allowing SIGQUIT to prompt fast shutdown of the stats collector seems sane,
>> though.  Try to make sure it doesn't leave partly-written stats files
>> behind.
> 
> The attached patch based on HEAD does this.  I'd like this to be back-patched because one of our important customers
uses9.2.
 
> 
> I didn't remove partially written stat files on SIGQUIT for the following reasons.  Is this OK?
> 
> 1. The recovery at the next restart will remove the stat files.
> 2. SIGQUIT processing should be as fast as possible.
> 3. If writing stats files took long due to the OS page cache flushing, removing files might be forced to wait
likewise.

ISTM that this would change the "immediate shutdown" to not save stats
files anymore.  So far, all the shutdown modes are equivalent in terms
of how they preserve data and system state.  They differ only in when
the hard work happens.  This would be a deviation from that principle.

Child processes don't distinguish between a SIGQUIT coming from a
user-initiated immediate shutdown request and a crash-induced
kill-everyone directive.  So there might not be a non-ugly way to
address that.

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



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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Parallel execution and prepared statements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [RFC] Should we fix postmaster to avoid slow shutdown?