Re: "could not open file "pg_wal/…": No such file or directory" potential crashing bug due to race condition betweenrestartpoint and recovery

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: "could not open file "pg_wal/…": No such file or directory" potential crashing bug due to race condition betweenrestartpoint and recovery
Дата
Msg-id 20180924153705.GB1103@paquier.xyz
обсуждение исходный текст
Ответ на "could not open file "pg_wal/…": No such file or directory" potential crashing bug due to race condition between restartpoint and recovery  (Thomas Crayford <tcrayford@salesforce.com>)
Ответы Re: "could not open file "pg_wal/…": No such file or directory" potential crashing bug due to race condition between restartpoint and recovery
Список pgsql-bugs
On Mon, Sep 24, 2018 at 12:58:59PM +0100, Thomas Crayford wrote:
> May 20 09:56:14 redacted[9]: [2468859-1] sql_error_code = 00000 LOG:
> restored log file "00000002000072B50000003A" from archive
> May 20 09:56:14 ip-10-0-92-26 redacted[141]: [191806-1] sql_error_code =
> 58P01 ERROR: could not open file "pg_wal/00000002000072B50000003A": No such
> file or directory

What kind of restore_command is used here?

> Looking at the code, I think that the two racing functions are
> RestoreArchivedFile, and CreateRestartPoint.
>
> The former calls unlink on the wal segment, CreateRestartPoint does attempt
> to do recycling on segments.

Don't you mean KeepFileRestoredFromArchive()?  RestoreArchivedFile would
call unlink() on pg_wal/RECOVERYXLOG so that does not match.
--
Michael

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15397: perl error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15397: perl error