Can two-phase commit support LISTEN, UNLISTEN, and NOTIFY?
От | James Stuart |
---|---|
Тема | Can two-phase commit support LISTEN, UNLISTEN, and NOTIFY? |
Дата | |
Msg-id | f31290e4-7d3e-4784-252d-2f1863301522@privatejuris.org обсуждение исходный текст |
Ответы |
Re: Can two-phase commit support LISTEN, UNLISTEN, and NOTIFY?
|
Список | pgsql-general |
Can you please clarify, is lack of support for "LISTEN, UNLISTEN, and NOTIFY" with two-phase commits an architecture limitation or is this lacking implementation? The NOTIFY happens after the transaction commits and can't undo the transaction, so I can't think of any reason why this could interfere with the two-phase commit.
https://www.postgresql.org/docs/current/sql-prepare-transaction.html
> "It is not currently allowed to PREPARE a transaction that has executed any operations involving temporary tables or the session's temporary namespace, created any cursors WITH HOLD, or executed LISTEN, UNLISTEN, or NOTIFY. Those features are too tightly tied to the current session to be useful in a transaction to be prepared."
I can't see a work-around even by writing to an event queue table. The event queue table can't be populated by either during a two-phase commit so it would have to be polled negating the purpose of LISTEN / NOTIFY.
В списке pgsql-general по дате отправления: