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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Дата
Msg-id 10004.1479849358@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Robert Haas <robertmhaas@gmail.com>)
Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Andres Freund <andres@anarazel.de>)
Re: [RFC] Should we fix postmaster to avoid slow shutdown?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Well, the problem is that the stats data is not on disk while the system
> is in operation, as far as I recall -- it's only in the collector's
> local memory.  On shutdown we tell it to write it down to a file, and on
> startup we tell it to read it from the file and then delete it.  I think
> the rationale for this is to avoid leaving a file with stale data on
> disk while the system is running.

Maybe a workable compromise would be to leave the file present, and have
the stats collector re-write it every (say) five minutes.  Then I'd be
okay with having an immediate shutdown skip writing the file; you'd be
losing up to five minutes' worth of activity, but not going completely
nuts.  So the stats collector's normal activities would include writing
the temp file on-demand and the permanent file on a timed cycle.

The other components of the fix (deleting on PITR rewind or stats
collector crash) would remain the same.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [RFC] Should we fix postmaster to avoid slow shutdown?