Re: The same 2PC data maybe recovered twice

Поиск
Список
Период
Сортировка
Искать
От
suyu.cmj
Тема
Re: The same 2PC data maybe recovered twice
Дата
Msg-id
27cf1fe2-e8f9-4fca-a828-aa3ad3397acd.mengjuan.cmj@alibaba-inc.com
Ответ на
Список
Дерево обсуждения
Re: The same 2PC data maybe recovered twice "suyu.cmj" <mengjuan.cmj@alibaba-inc.com>
Re: The same 2PC data maybe recovered twice Michael Paquier <michael@paquier.xyz>
Re: The same 2PC data maybe recovered twice "suyu.cmj" <mengjuan.cmj@alibaba-inc.com>
Re: The same 2PC data maybe recovered twice Michael Paquier <michael@paquier.xyz>
Re: The same 2PC data maybe recovered twice "suyu.cmj" <mengjuan.cmj@alibaba-inc.com>
Re: The same 2PC data maybe recovered twice "suyu.cmj" <mengjuan.cmj@alibaba-inc.com>
Re: The same 2PC data maybe recovered twice Michael Paquier <michael@paquier.xyz>
Yes, this bug can also be reproduced on the master branch, and the corresponding reproduction patch is attached.

I also considered comparing the 2pc.prepare_start_lsn and checkpoint.redo in ProcessTwoPhaseBuffer before, but this method requires modifying the format of the 2pc checkpoint file, which will bring compatibility issues. Especially for released branches, assuming that a node has encountered this bug, it will not be able to start successfully due to FATAL during crash recovery, and therefore cannot manually commit previous two-phase transactions. Using magic number to distinguish 2pc checkpoint file versions can't solve the problem in the above scenario either.

For unreleased branches, writing 2pc.prepare_start_lsn into the checkpoint file will be a good solution, but for released branches, I personally think using WAL record to overwrite checkpoint data would be a more reasonable approach, What do you think?

Best Regards
suyu.cmj
В списке pgsql-bugs по дате отправления
От: Michael Paquier
Дата:
От: PG Bug reporting form
Дата:
FAQ