Re: The same 2PC data maybe recovered twice

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: The same 2PC data maybe recovered twice
Дата
Msg-id ZLYfkPNovHH+IIhE@paquier.xyz
обсуждение исходный текст
Ответ на Re: The same 2PC data maybe recovered twice  ("suyu.cmj" <mengjuan.cmj@alibaba-inc.com>)
Список pgsql-bugs
On Mon, Jul 17, 2023 at 05:20:00PM +0800, suyu.cmj wrote:
> Thanks for the feedback! I have updated the patch, hope you can check it.

I have looked at v3, and noticed that the stat() call is actually a
bit incorrect in its error handling because it would miss any errors
that happen when checking for the existence of the file.  The only
error that we should safely expect is ENOENT, for a missing entry.
All the other had better fail like the other code paths restoring 2PC
entries from the shared state.  At the end, I have made the choice of
relying only on access() to check the existence of the file as this is
an internal place, simplified a bit the comment.  Finally, I have made
the choice to remove the assert-only check.  After sleeping on it, it
would have value in very limited cases while a bunch of recovery cases
would take a hit, including developers with large 2PC setups, so there
are a lot of downsides with limited upsides.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump needs an option to add the force flag to the drop database
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)