| From: | Zhijie Hou <houzhijie22(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(at)gmail(dot)com>, 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>, 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:25:13 |
| Message-ID: | 656eae1c-21a8-4172-9270-6532d90650cc@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Nov25, 2026 at 10:56 PM vignesh C wrote:
> 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):
>
> ...
> 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.
>
IIUC, the hint comes unconditionally from reportDependentObjects() for
any DROP_RESTRICT deletion, and other commands without CASCADE support
already show the same hint, e.g., ALTER TABLE ... ALTER COLUMN ... DROP
IDENTITY, ALTER TABLE ... ALTER COLUMN ... TYPE, and DROP INDEX
CONCURRENTLY (similarly, ALTER GROUP ... DROP USER emits "Use CASCADE to
revoke them too.")
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.
--
Best Regards,
Zhijie Hou
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hayato Kuroda (Fujitsu) | 2026-11-26 03:33:33 | RE: Proposal: Conflict log history table for Logical Replication |
| Previous Message | Lukas Fittl | 2026-11-26 03:12:37 | Re: Unify parallel worker handling for index builds and instrumentation |