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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Дата
Msg-id 20161122212659.ayg5mqnvckim3nbq@alvherre.pgsql
обсуждение исходный текст
Ответ на 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?
Список pgsql-hackers
Andres Freund wrote:
> On 2016-11-22 16:15:58 -0500, Tom Lane wrote:

> > 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.

+1

> It could even make sense to WAL log the contents of the stats file at
> checkpoint (or similar) time. Then it'd be sane after crash recovery,
> including starting from an old base backup.  Loosing the information
> about what to vacuum / analyze after a failover is quite problematic...

An idea worth considering.  This would also mean the file is valid in a
standby -- the lack of the file is currently a problem if you promote
the standby, as I recall.  But the file is perhaps too large to write to
WAL on every checkpoint.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

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