RE: Proposal: Conflict log history table for Logical Replication

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Zhijie Hou' <houzhijie22(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com>
Subject: RE: Proposal: Conflict log history table for Logical Replication
Date: 2026-11-26 03:33:33
Message-ID: OS7PR01MB18317E4263CD0896F40E3CDC8F5422@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> Improving it might require teaching the dependency machinery (e.g.,
> maybe via a new PERFORM_DELETION_* flag) whether the caller supports
> CASCADE, so I think we could consider it as a separate improvement.

Right. A patch like attached fixes the issue, but it may be to be adopted to
other areas. See the output [1].

[1]:
```
postgres=# CREATE SUBSCRIPTION sub CONNECTION 'user=postgres' PUBLICATION pub WITH (connect=false, enabled=false, conflict_log_destination=all);
NOTICE: created conflict log table "pg_conflict.pg_conflict_log_16384" for subscription "sub"
WARNING: subscription was created, but is not connected
HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and alter the subscription to refresh publications.
CREATE SUBSCRIPTION
postgres=# CREATE VIEW v1 AS SELECT * FROM pg_conflict.pg_conflict_log_16384;
CREATE VIEW
postgres=# ALTER SUBSCRIPTION sub SET (conflict_log_destination = log);
ERROR: cannot drop table pg_conflict.pg_conflict_log_16384 because other objects depend on it
DETAIL: view v1 depends on table pg_conflict.pg_conflict_log_16384
postgres=#
```

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
kuroda_diffs.txt text/plain 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-11-26 03:37:15 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Zhijie Hou 2026-11-26 03:25:13 Re: Proposal: Conflict log history table for Logical Replication