Re: [PATCH] Avoid pallocs in async.c's "critical section"

Поиск
Список
Период
Сортировка
От Arseniy Mukhin
Тема Re: [PATCH] Avoid pallocs in async.c's "critical section"
Дата
Msg-id CAE7r3MLT9Bivi6DQxG=5D7Foic-DLu+sLfPbo8t-MJz0GCfBqg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Avoid pallocs in async.c's "critical section"  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers
Hi,

On Tue, Nov 25, 2025 at 9:14 PM Joel Jacobson <joel@compiler.org> wrote:
>
> ...
> Darn, I forgot about the edge-case where something fails in xact.c
> in between PreCommit_Notify(); and AtCommit_Notify();
> causing an abort.
>
> In this case, AtAbort_Notify() would need to undo the effect
> of the LISTEN/UNLISTEN commands that would already have been
> executed, with the 0003 patch.
>
> A normal BEGIN; LISTEN foo; ROLLBCK; is not a problem though,
> since that will never reach PreCommit_Notify().
>
> Just curious, what type of problems could cause an abort between
> PreCommit_Notify and AtCommit_Notify?
>

Serializable conflict could cause an abort after PreCommit_Notify.
0002 in [0] is an example of how it can be reproduced.

[0] https://www.postgresql.org/message-id/CAE7r3MJgJj4D_6mPHMr-4xCrYK7q04M3jM1J_=4baphjA2WeBA@mail.gmail.com


Best regards,
Arseniy Mukhin



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