From 003aa7cd98a5c318ea5313ac6c8a3b3851b7377a Mon Sep 17 00:00:00 2001 From: Osumi Takamichi Date: Mon, 14 Jun 2021 05:27:28 +0000 Subject: [PATCH v06] additional deadlock scenarios of synchronous logical decoding Add (1) more scenario descriptions specific to logical decoding of two-phase transactions to the exising deadlock list of synchronous logical decoding and (2) a reference to this caveats from another section of two-phase commit. Author: Takamichi Osumi Reviewed-by: Amit Kapila Reviewed-by: Vignesh C Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de --- doc/src/sgml/logicaldecoding.sgml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index d0fae5b..78eac27 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -1126,6 +1126,22 @@ OutputPluginWrite(ctx, true); + Performing PREPARE TRANSACTION after LOCK + command on pg_class and logical decoding of published + table. + + + + + + Clustering pg_trigger and decoding PREPARE + TRANSACTION, if any published table have a trigger and any + operations that will be decoded are conducted. + + + + + Executing TRUNCATE on user catalog table in a transaction. @@ -1297,9 +1313,10 @@ stream_commit_cb(...); <-- commit of the streamed transaction The logical replication solution that builds distributed two phase commit using this feature can deadlock if the prepared transaction has locked - [user] catalog tables exclusively. They need to inform users to not have - locks on catalog tables (via explicit LOCK command) in - such transactions. + [user] catalog tables exclusively. To avoid this users must refrain from + having locks on catalog tables (e.g. explicit LOCK command) + in such transactions. + (See for the details.) -- 2.2.0