pgsql: Doc: Explain prepared transaction lock waits with two_phase subs
pgsql: Doc: Explain prepared transaction lock waits with two_phase subs
От:
Amit Kapila <akapila@postgresql.org>
Дата:
Doc: Explain prepared transaction lock waits with two_phase subscriptions. A transaction prepared by the apply worker retains its locks until the corresponding COMMIT PREPARED or ROLLBACK PREPARED is applied. If another session waits for a conflicting lock held by the prepared transaction, the apply worker's subsequent conflicting lock requests can queue behind that session. This can prevent the apply worker from reaching the COMMIT PREPARED or ROLLBACK PREPARED that would release the prepared transaction's locks. The deadlock detector cannot detect this situation because a prepared transaction does not wait for any locks and therefore cannot participate in a deadlock cycle. As a result, replication can remain stalled indefinitely. Document this behavior and the recovery procedure under CREATE SUBSCRIPTION and PREPARE TRANSACTION. Author: Zhijie Hou Reviewed-by: Bertrand Drouvot Reviewed-by: Hayato Kuroda Reviewed-by: shveta malik Reviewed-by: Masahiko Sawada Reviewed-by: Nisha Moond Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/72c9b956-96c3-40a5-99bb-d9b7338c0bab@gmail.com Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2490a756460460eaf5a3636993257bee47347f41 Modified Files -------------- doc/src/sgml/ref/create_subscription.sgml | 16 ++++++++++++++++ doc/src/sgml/ref/prepare_transaction.sgml | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-)