From 4d3cf231b6477c68202f9db1597904618e1e6f23 Mon Sep 17 00:00:00 2001 From: Osumi Takamichi Date: Sun, 20 Jun 2021 12:15:27 +0000 Subject: [PATCH v3] Doc: Update caveats in synchronous logical replication. Reported-by: Simon Riggs Author: Takamichi Osumi Reviewed-by: Amit Kapila Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky@alap3.anarazel.de --- doc/src/sgml/logicaldecoding.sgml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 1765ea6..1a58468 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -1097,16 +1097,18 @@ OutputPluginWrite(ctx, true); In synchronous replication setup, a deadlock can happen, if the transaction - has locked [user] catalog tables exclusively. This is because logical decoding of - transactions can lock catalog tables to access them. To avoid this users - must refrain from taking an exclusive lock on [user] catalog tables. This can - happen in the following ways: + has locked [user] catalog tables exclusively. See + for information on user + catalog tables. This is because logical decoding of transactions can lock + catalog tables to access them. To avoid this users must refrain from taking + an exclusive lock on [user] catalog tables. This can happen in the following + ways: Issuing an explicit LOCK on pg_class - (or any other catalog table) in a transaction. + in a transaction. @@ -1141,6 +1143,8 @@ OutputPluginWrite(ctx, true); + Note that those commands that can cause deadlock apply to not only catalog tables + explicitly indicated above but also any other [user] catalog table. @@ -1311,7 +1315,7 @@ stream_commit_cb(...); <-- commit of the streamed transaction [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.) + See for the details. -- 2.2.0