| From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
|---|---|
| To: | Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(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-26 05:42:38 |
| Message-ID: | CAHut+PsSFrKUX2vs610U1hovhjK-BzcCWF9_CDtEV7TJQ5iTog@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
I'm catching up on feedback from last week while I was away. The
suggestions seem to be pulling in different directions:
- Fujii-San: reworded the ALTER PUBLICATION note to account for
ADD/DROP/EXCEPT (Shveta: +1)
- Chao: liked the first part of that wording but doesn't think the
EXCEPT mention is needed
- Surya: pointed out that DROP is still unclear, and suggested
documenting that DROP TABLE p * doesn't remove explicitly-added
partitions
- Chao: documenting that uncommon case might just cause confusion
It's hard to reconcile all of these, but here is what I have done:
1. The debate is only about ALTER PUBLICATION, so I have split the
patch. 0001 now covers only CREATE PUBLICATION. It is the same as v2,
which was already reviewed and approved. (Surya, I saw your minor
point about the repeated "implicitly part of the publication" text in
CREATE. I kept 0001 the same as v2 since it was already approved, but
we can keep discussing if the committer prefers.)
2. 0002 covers only ALTER PUBLICATION. I fixed the newline mistake,
and changed the wording to be minimal:
For a partitioned table, ONLY and * have no effect.
AFAIK, this should be accurate for ADD/SET/DROP/EXCEPT alike, and it
makes no claim about "adding", which was the problem with the earlier
wording. It also doesn't need to mention EXCEPT or describe DROP
semantics.
If anyone thinks the behaviour of DROP TABLE p * with explicitly-added
partitions is a bug, I think that deserves its own thread.
3. TBH, I have never been happy with how the ALTER PUBLICATION page is
structured. The DESCRIPTION describes the second, third, and fourth
"variants" inline, unlike other syntax pages where the clauses are
listed separately, so there is no clear place for clause-specific
notes. A single "table_name" covers multiple sub-commands, which means
any note about partitioned tables has to be true for all of them. We
have discussed rewriting that page before, and I hope it can be
tackled for PG20, but that is out of scope for this thread.
Both patches are intended for master only. Thoughts?
Kind Regards,
Peter Smith
Fujitsu Australia
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-DOCS-Remove-ambiguous-wording-about-ONLY-for-part.patch | application/octet-stream | 1.8 KB |
| v4-0002-DOCS-ALTER-PUBLICATION-ONLY-and-for-partitioned-t.patch | application/octet-stream | 1.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Henson Choi | 2026-10-26 05:44:21 | Re: [DEPARSE] A COLLATE clause in the URI of XMLNAMESPACES does not read back |
| Previous Message | shveta malik | 2026-10-26 04:58:58 | Re: Proposal: Conflict log history table for Logical Replication |