Re: Proposal: Conflict log history table for Logical Replication

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Zhijie Hou <houzhijie22(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-25 14:56:42
Message-ID: CALDaNm2GFSp-P=RBT=9gzC=TL-pcc8cV09fXd4FUYJwHKh-9RA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 25 Nov 2026 at 17:23, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> Attached v2 patch fixing above as well as other comments from Hou-san at [2].

Thanks for the updated patch, one comment:
With this change, setting conflict_log_destination to log in ALTER
SUBSCRIPTION will fail with an inappropriate hint: "Use DROP ...
CASCADE to drop the dependent objects too". This hint is misleading
because ALTER SUBSCRIPTION does not support CASCADE(it is ok in drop
subscription case):
@@ -1628,7 +1630,8 @@ alter_sub_conflict_log_dest(Subscription *sub,
ConflictLogDest oldlogdest,
if (!want_table)
{
drop_sub_conflict_log_table(sub->oid, sub->name,
-
sub->conflictlogrelid);
+
sub->conflictlogrelid, DROP_RESTRICT,
+
false);

Ex:
-- Create a view on CLT table
create view v1 as select * from pg_conflict.pg_conflict_log_16392;
-- Alter subscription fails with inappropriate hint "HINT: Use DROP
... CASCADE to drop the dependent objects too"
postgres=# alter subscription sub1 set (conflict_log_destination = log);
ERROR: cannot drop table pg_conflict.pg_conflict_log_16392 because
other objects depend on it
DETAIL: view v1 depends on table pg_conflict.pg_conflict_log_16392
HINT: Use DROP ... CASCADE to drop the dependent objects too.

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-11-25 15:11:41 Re: Remove inner joins based on foreign keys
Previous Message Heikki Linnakangas 2026-11-25 14:44:40 Re: Wrong table in "conflicting or redundant WHERE clauses / column lists" publicaiton error