From 625104cc0448ceea738c9151c5b9ccbeb0c1e125 Mon Sep 17 00:00:00 2001 From: Osumi Takamichi Date: Thu, 10 Jun 2021 10:57:52 +0000 Subject: [PATCH v05] additional deadlock scenarios of synchronous logical decoding Add (1) more scenario descriptions specific to two phase commit 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 51a5060..0a021c5 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -1127,6 +1127,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. @@ -1298,9 +1314,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