Re: BUG #15346: Replica fails to start after the crash

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15346: Replica fails to start after the crash
Дата
Msg-id 20180830133911.GA15446@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #15346: Replica fails to start after the crash  (Alexander Kukushkin <cyberdemn@gmail.com>)
Ответы Re: BUG #15346: Replica fails to start after the crash
Re: BUG #15346: Replica fails to start after the crash
Список pgsql-hackers
On Thu, Aug 30, 2018 at 10:55:23AM +0200, Alexander Kukushkin wrote:
> Bgwriter itself never changes updateMinRecoveryPoint to true and boom,
> we can get a lot of pages written to disk, but minRecoveryPoint in the
> pg_control won't be updated!

That's indeed obvious by reading the code.  The bgwriter would be
started only once a consistent point has been reached, so the startup
process would have normally already updated the control file to the
consistent point.  Something like the attached should take care of the
problem.  As the updates of the local copy of minRecoveryPoint strongly
rely on if the startup process is used, I think that we should use
InRecovery for the sanity checks.

I'd like to also add a TAP test for that, which should be easy enough if
we do sanity checks by looking up at the output of the control file.
I'll try to put more thoughts on that.

Does it take care of the problem?
--
Michael

Вложения

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Startup cost of sequential scan