race condition when writing pg_control

Поиск
Список
Период
Сортировка
От Bossart, Nathan
Тема race condition when writing pg_control
Дата
Msg-id 70BF24D6-DC51-443F-B55A-95735803842A@amazon.com
обсуждение исходный текст
Ответы Re: race condition when writing pg_control  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hi hackers,

I believe I've discovered a race condition between the startup and
checkpointer processes that can cause a CRC mismatch in the pg_control
file.  If a cluster crashes at the right time, the following error
appears when you attempt to restart it:

        FATAL:  incorrect checksum in control file

This appears to be caused by some code paths in xlog_redo() that
update ControlFile without taking the ControlFileLock.  The attached
patch seems to be sufficient to prevent the CRC mismatch in the
control file, but perhaps this is a symptom of a bigger problem with
concurrent modifications of ControlFile->checkPointCopy.nextFullXid.

Nathan


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: do {} while (0) nitpick
Следующее
От: Robert Haas
Дата:
Сообщение: Re: design for parallel backup