Re: Possible corruption by CreateRestartPoint at promotion

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Possible corruption by CreateRestartPoint at promotion
Дата
Msg-id Ymnb3XlT4YwJ5yOH@paquier.xyz
обсуждение исходный текст
Ответ на Re: Possible corruption by CreateRestartPoint at promotion  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Wed, Apr 27, 2022 at 11:09:45AM -0700, Nathan Bossart wrote:
> On Wed, Apr 27, 2022 at 02:16:01PM +0900, Michael Paquier wrote:
>> -   if (ControlFile->state == DB_IN_ARCHIVE_RECOVERY &&
>> -       ControlFile->checkPointCopy.redo < lastCheckPoint.redo)
>> -   {
>> 7ff23c6 has removed the last call to CreateCheckpoint() outside the
>> checkpointer, meaning that there is one less concurrent race to worry
>> about, but I have to admit that this change, to update the control
>> file's checkPoint and checkPointCopy even if we don't check after
>> ControlFile->checkPointCopy.redo < lastCheckPoint.redo would make the
>> code less robust in ~14.  So I am questioning whether a backpatch
>> is actually worth the risk here.
>
> IMO we should still check this before updating ControlFile to be safe.

Sure.  Fine by me to play it safe.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pgsql: Add contrib/pg_walinspect.
Следующее
От: "Euler Taveira"
Дата:
Сообщение: trivial comment fix