pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Document a few caveats in synchronous logical replication.
8+ messages / 3 participants
[nested] [flat]

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 1 reply; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9f7bba2629cf3413638936d0376bb50403144332

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 76 +++++++++++++++++++++++++++++----------
1 file changed, 57 insertions(+), 19 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3cb828dbe26087e7754f49f3cfe3ed036d5af439

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 100 +++++++++++++++++++++++++++++---------
1 file changed, 78 insertions(+), 22 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/eb231dbd80d2318e27e9b4d0aa72696de6e6b32f

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 76 +++++++++++++++++++++++++++++----------
1 file changed, 57 insertions(+), 19 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5a456034b84e9147e648d512c66f2b2a50bad9f3

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 76 +++++++++++++++++++++++++++++----------
1 file changed, 57 insertions(+), 19 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ff33be61f212a521449565829904adab3e738524

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 76 +++++++++++++++++++++++++++++----------
1 file changed, 57 insertions(+), 19 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 06:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 06:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Document a few caveats in synchronous logical replication.

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.

Author: Takamichi Osumi
Reviewed-by: Vignesh C, Amit Kapila
Backpatch-through: 9.6
Discussion: https://www.postgresql.org/message-id/20210222222847.tpnb6eg3yiykzpky%40alap3.anarazel.de

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/acdb523cb642e190e55719b8e4769a99fc767606

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml | 76 +++++++++++++++++++++++++++++----------
1 file changed, 57 insertions(+), 19 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 11:45  Simon Riggs <simon.riggs@enterprisedb.com>
  parent: Amit Kapila <akapila@postgresql.org>
  0 siblings, 1 reply; 8+ messages in thread

From: Simon Riggs @ 2021-06-17 11:45 UTC (permalink / raw)
  To: Amit Kapila <akapila@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, Jun 17, 2021 at 7:25 AM Amit Kapila <akapila@postgresql.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/





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Document a few caveats in synchronous logical replication.
@ 2021-06-17 11:58  Amit Kapila <amit.kapila16@gmail.com>
  parent: Simon Riggs <simon.riggs@enterprisedb.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Amit Kapila @ 2021-06-17 11:58 UTC (permalink / raw)
  To: Simon Riggs <simon.riggs@enterprisedb.com>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

On Thu, Jun 17, 2021 at 5:15 PM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:
>
> On Thu, Jun 17, 2021 at 7:25 AM Amit Kapila <akapila@postgresql.org> wrote:
>
>
> > 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.
>

I have responded to your comments on the corresponding -hackers thread.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2021-06-17 11:58 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>
2021-06-17 11:45 ` Simon Riggs <simon.riggs@enterprisedb.com>
2021-06-17 11:58   ` Amit Kapila <amit.kapila16@gmail.com>
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>
2021-06-17 06:25 pgsql: Document a few caveats in synchronous logical replication. Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox