| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Subject: | Re: docs: clarify ALTER TABLE behavior on partitioned tables |
| Date: | 2026-01-07 22:17:39 |
| Message-ID: | CAKFQuwbWNCX1M1e9_-3P9RVGo10huPjuqdL74FJ+-a5EW791KA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jan 7, 2026 at 1:29 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> >
> >
> > [1]
> https://postgr.es/m/CAEoWx2nJ71hy8R614HQr7vQhkBReO9AANPODPg0aSQs74eOdLQ@mail.gmail.com
> >
> > <v1-0001-docs-clarify-ALTER-TABLE-behavior-on-partitioned-.patch>
>
> Added to CF: https://commitfest.postgresql.org/patch/6379/
>
>
Fairly easy to review in its current form.
I've included my changes as a patch over your version 1.
The main points of interest:
Saying that "ONLY" is a no-op when the observed behavior is that only
the mentioned tables are affected seems wrong. I've removed those
instances.
I tried to keep the "and 'is implicitly <actioned>" verbiage consistent
throughout. "Implicitly present" just seems off regardless of consistency.
"new partitions created in the future" - this is wordy given that "new"
implies "created in the future". Went with a simple "Newly created
partitions".
I did mentally note at the end of this review session that quite a bit of
text is spent saying how "create table" works in this "alter table"
reference. I didn't try to address it though.
You were using "can be applied independently" when in fact one "must"
specify all desired tables to be acted upon in those sub-commands. And, in
that case in particular, if ONLY is accepted it would just do what the
command already does. I removed the mention of ONLY in these "must" cases.
The majority of additions you made and existing mentions of "individual
partitions" do not include the clarification of "(leaf)". I removed those
that did - it seems like an unnecessary clarification.
If one has dropped a constraint from a partitioned table there would be no
reason to expect that future newly created partitions might somehow have
it. I removed the wording that stated that this was the case.
It didn't seem necessary to point out that the obsolete backward compatible
syntax for OIDS doesn't apply to partition-related tables.
Overall it looks good. The mentions of "newly created ... do [not]
inherit" is my only place of doubt. I'd be inclined to remove them all,
and if they are not covered elsewhere, introduce a section to cover them in
the DDL chapter.
David J.
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-docs-Clarify-ALTER-TABLE-v1.patch | text/x-patch | 31.8 KB |
| v2-0002-docs-Clarify-ALTER-TABLE-v1-edits.patch | text/x-patch | 16.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-01-07 22:22:02 | Re: [PATCH] Add sampling statistics to autoanalyze log output |
| Previous Message | David Rowley | 2026-01-07 21:53:55 | Re: [PATCH] Provide support for trailing commas |