Re: Wait event that should be reported while waiting for WALarchiving to finish

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Wait event that should be reported while waiting for WALarchiving to finish
Дата
Msg-id 20200217094857.GB115140@paquier.xyz
обсуждение исходный текст
Ответ на Re: Wait event that should be reported while waiting for WALarchiving to finish  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Wait event that should be reported while waiting for WALarchiving to finish  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On Mon, Feb 17, 2020 at 04:30:00PM +0900, Fujii Masao wrote:
> On 2020/02/14 23:43, Robert Haas wrote:
>> On Thu, Feb 13, 2020 at 10:47 PM Fujii Masao
>> <masao.fujii@oss.nttdata.com> wrote:
>>> Fixed. Thanks for the review!
>>
>> I think it would be safer to just report the wait event during
>> pg_usleep(1000000L) rather than putting those calls around the whole
>> loop. It does not seem impossible that ereport() or
>> CHECK_FOR_INTERRUPTS() could do something that reports a wait event
>> internally.

CHECK_FOR_INTERRUPTS() would reset the event wait state.  Hm..  You
may be right about the WARNING and it would be better to not rely on
that.  Do you remember the states which may be triggered?

> OK, so I attached the updated version of the patch.
> Thanks for the review!

Actually, I have some questions:
1) Should a new wait event be added in recoveryPausesHere()?  That
would be IMO useful.
2) Perhaps those two points should be replaced with WaitLatch(), where
we would use the new wait events introduced?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: tiny documentation fix
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Orphaned relation files after crash recovery