Re: New WAL record to detect the checkpoint redo location

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: New WAL record to detect the checkpoint redo location
Дата
Msg-id ZPARqli3/euwXZed@paquier.xyz
обсуждение исходный текст
Ответ на Re: New WAL record to detect the checkpoint redo location  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: New WAL record to detect the checkpoint redo location
Список pgsql-hackers
On Wed, Aug 30, 2023 at 04:51:19PM +0530, Dilip Kumar wrote:
> Your suggestions LGTM so modified accordingly

I have been putting my HEAD on this patch for a few hours, reviewing
the surroundings, and somewhat missed that this computation is done
while we do not hold the WAL insert locks:
+       checkPoint.redo = ProcLastRecPtr;

Then a few lines down the shared Insert.RedoRecPtr is updated while
holding an exclusive lock.
    RedoRecPtr = XLogCtl->Insert.RedoRecPtr = checkPoint.redo;

If we have a bunch of records inserted between the moment when the
REDO record is inserted and the moment when the checkpointer takes the
exclusive WAL lock, aren't we potentially missing a lot of FPW's that
should exist since the redo LSN?
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Streaming I/O, vectored I/O (WIP)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] Add native windows on arm64 support