Re: Problem while setting the fpw with SIGHUP

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Problem while setting the fpw with SIGHUP
Дата
Msg-id 20180316052354.GI2666@paquier.xyz
обсуждение исходный текст
Ответ на Re: Problem while setting the fpw with SIGHUP  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Problem while setting the fpw with SIGHUP  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On Tue, Mar 13, 2018 at 05:04:04PM +0900, Michael Paquier wrote:
> Instead of doing what you are suggesting, why not moving
> InitXLogInsert() out of InitXLOGAccess() and change InitPostgres() so as
> the allocations for WAL inserts is done unconditionally?  This has
> the cost of also making this allocation even for backends which are
> started during recovery, still we are talking about allocating a couple
> of bytes in exchange of addressing completely all race conditions in
> this area.  InitXLogInsert() does not depend on any post-recovery data
> like ThisTimeLineId, so a split is possible.

I have been hacking things this way, and it seems to me that it takes
care of all this class of problems.  CreateCheckPoint() actually
mentions that InitXLogInsert() cannot be called in a critical section,
so the comments don't match the code.  I also think that we still want
to be able to use RecoveryInProgress() in critical sections to do
decision-making for the generation of WAL records.
--
Michael

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: pspg pager 1.0.0
Следующее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: RE: [bug fix] Cascaded standby cannot start after a clean shutdown