Re: pgsql: Document a few caveats in synchronous logical replication.

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Amit Kapila <akapila(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Document a few caveats in synchronous logical replication.
Date: 2021-06-17 11:45:29
Message-ID: CANbhV-EOy=viOebh4iqi3s+N86g8mcoMhR-z=_NhPu0+C=iPgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Jun 17, 2021 at 7:25 AM Amit Kapila <akapila(at)postgresql(dot)org> wrote:

> In a synchronous logical setup, locking [user] catalog tables can cause
> deadlock. This is because logical decoding of transactions can lock
> catalog tables to access them so exclusively locking those in transactions
> can lead to deadlock. To avoid this users must refrain from having
> exclusive locks on catalog tables.

If LOCK and TRUNCATE is advised against on all user catalog tables,
why would CLUSTER only apply to pg_class? Surely its locking level is
the same as LOCK?

The use of "[user]" isn't fully explained, so it might not be clear
that this applies to both Postgres catalog tables and any user tables
that have been nominated as catalogs. Probably worth linking to the
"Capabilities" section to explain.

It would be worth coalescing the following sections into a single
page, since they are just a few lines each:
Streaming Replication Protocol Interface
Logical Decoding SQL Interface
System Catalogs Related to Logical Decoding

> Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Unfortunately this is a URL linking to the top of a huge discussion,
so isn't useful in locating the actual discussion.

--
Simon Riggs http://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2021-06-17 11:58:06 Re: pgsql: Document a few caveats in synchronous logical replication.
Previous Message Thomas Munro 2021-06-17 11:32:25 Re: pgsql: Make archiver process an auxiliary process.