| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | surya poondla <suryapoondla4(at)gmail(dot)com> |
| Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: DOCS - CREATE PUBLICATION wording re 'ONLY' for partitioned tables. |
| Date: | 2026-10-23 01:06:53 |
| Message-ID: | F01BB54A-C5E1-486E-A62D-24D3936E7EF8@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Oct 23, 2026, at 02:36, surya poondla <suryapoondla4(at)gmail(dot)com> wrote:
>
>
> Hi Peter,
>
> I looked at v3. I agree ONLY/* have no effect for partitioned tables in every ALTER PUBLICATION variant i.e OpenTableList() skips recursion
> for RELKIND_PARTITIONED_TABLE regardless of ADD/SET/DROP/EXCEPT.
>
> A few points,
>
> 1. Following on from Fujii's point that table_name in ALTER PUBLICATION also covers DROP, the new note explains ONLY/* only in
> terms of adding, which leaves DROP unclear. For example:
>
> CREATE TABLE p (id int) PARTITION BY RANGE (id);
> CREATE TABLE p1 PARTITION OF p FOR VALUES FROM (0) TO (100);
> CREATE PUBLICATION c FOR TABLE p, p1;
> ALTER PUBLICATION c DROP TABLE p *;
> -- p1 remains in pg_publication_rel
>
> whereas for a plain inheritance parent, DROP TABLE parent (without ONLY) also removes the child. Maybe worth saying that dropping a
> partitioned table does not remove partitions that were added to the publication explicitly.
>
I don’t think this is a normal usage that we want to prompt. I’m afraid that describing details of such an edge case may just make users confused. In the meantime, I would challenge if that’s a bug. IMO, dropping “p *” should drop p1.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-10-23 01:08:04 | Re: tablecmds: Deadlock caused by Attach Partition |
| Previous Message | Chao Li | 2026-10-23 00:52:40 | Re: Parallel vacuum: workers together with leader could overrun cost budget |