Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ve7b6-0097Qk-1m for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jan 2026 08:11:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1ve7b5-006IPa-18 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jan 2026 08:11:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ve7b5-006IPS-04 for pgsql-hackers@lists.postgresql.org; Fri, 09 Jan 2026 08:11:51 +0000 Received: from mail-dy1-x132e.google.com ([2607:f8b0:4864:20::132e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ve7b3-005QyA-0S for pgsql-hackers@lists.postgresql.org; Fri, 09 Jan 2026 08:11:51 +0000 Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-2b0ea1edf11so9091979eec.0 for ; Fri, 09 Jan 2026 00:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767946307; x=1768551107; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3BASn9TfD+QVcWMW598jxGMH0+Zav8O0x7aUlQm1qD8=; b=H+99Ncd/ulR3ecpVsd8gFoLfNZeBNLz97PyLxX+bJKUPmwar9iY79k71QjVOAkGisE 1mJMmncWtmnnhbRKT8j/njScHLKBYaBGADy3CUMQFqD2BoqRRXenUoWUiYLbgLScPIOS LeplPWuSL9pd5jMQ+ZX15zjFDgqyX/cD8GHN7xAmcAV1edntiQCBgRZTGIObZ7+gG7Vy JVdXuwjJ/QMmD/GznSR/UEIvx1Sy7cnQ7Ct+afbAcioGeQizdIE6cCXVzuRc9BEsWDjQ y9TI0HUluOxtEwNMqgu8QjTkpAfPgzF+EXxCgehj5C+UrKWDdPbfwf6KUsOQ1oJCiAOg pRCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767946307; x=1768551107; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3BASn9TfD+QVcWMW598jxGMH0+Zav8O0x7aUlQm1qD8=; b=RlZm/YgGX38fpxY+errYZPhVCx0gtYG1d6TcwMmCbJikE9FdhoRCenrPDvE+uoHgsV UaPCdTOKg3kSJi8dYldSAGQ+sZ28p7GdkpURX+vNBpiW7VoEADHDRTD8wtVvdNm135oo f2W26I0LPQ6M8ubVLNc7KjQh+kkmdqtdAtfo5r9ftX+pokxRbea0CyQmpF9ZdY9VW0XU ++N63CrfDDu/JJpMS4cAyd4D4AxA8xErVkI63VgjU4pGRlctoT59bpOrDst5Nzn+yX/r 3JbSVb+IPE+R9ECorvAvc4WbsLyWgJbFI+aNGymVjrFTdbPaPZEASGlKmTtT2rev4oOc YcfQ== X-Gm-Message-State: AOJu0Yx0LkMOFGO8LI63+RbwVl8QQYU8dKtIzVZlX6vWaZsCxHPqgMAG P287PYAOG3zE6/F8N2eAAI6C1CvQm9mi5jAudz4LYYvxpIgpY5nzTzPT X-Gm-Gg: AY/fxX6g/2G9oH0oQgY2A1udUA8NH5O0sVOguSNQL+5VwB9HcCUx5qWbol3VURhvMcT 148+VrVm5yfyxQuqN2VC8RhxWmcxFY/zwsG5aCZ+0X1xz2cikRydUDOuRGeW7yo20kq2QX/sUcz H04RjsIT/Ofwps1XWQiCf4Hd+S40T00xNBorDF228Z6ce1qU8cl1t46ovTRDdGHcZ1F6EebW+Lk lBwnBc7lXvWDtmtMzEDXzUAmB16qkjx3E/LQauSay0laBf62i9uq+DXEAIaJUT8UVtua+O1fFzq l2Ni1rGStQzTK872fN1gwJi+LNDMTNmVWWr/x6DZ7k1TB03okxX/H2ePhd+79bH3LGxacHF/J0K E6NALoV1HoAkcb9+3+pLZzB2fIRw2w4yNpP+QO/qh8NcBCAIyjj1XHmA3ggrdB6Rbs+k7yr9okr +03Q1AxE4kW51qYLg6xA== X-Google-Smtp-Source: AGHT+IHEhzxoOGmm2Pjfn/mAyYXTZEJ5NO69dIXvgGcenxiHi/5i4lCW4kxs+xLVXZYfprmPkFlsJw== X-Received: by 2002:a05:7022:3d88:b0:122:1e3:5355 with SMTP id a92af1059eb24-12201e3550cmr2538876c88.50.1767946306535; Fri, 09 Jan 2026 00:11:46 -0800 (PST) Received: from smtpclient.apple ([64.32.14.230]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121f24984b0sm17312276c88.14.2026.01.09.00.11.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jan 2026 00:11:44 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables From: Chao Li In-Reply-To: Date: Fri, 9 Jan 2026 16:11:09 +0800 Cc: Postgres hackers , Amit Kapila Content-Transfer-Encoding: quoted-printable Message-Id: References: <90F9169D-135C-45E5-8221-4F79DAED98E2@gmail.com> To: "David G. Johnston" X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jan 8, 2026, at 06:17, David G. Johnston = wrote: >=20 > On Wed, Jan 7, 2026 at 1:29=E2=80=AFAM Chao Li = wrote: >=20 > >=20 > >=20 > > [1] = https://postgr.es/m/CAEoWx2nJ71hy8R614HQr7vQhkBReO9AANPODPg0aSQs74eOdLQ@ma= il.gmail.com > > > > >=20 > Added to CF: https://commitfest.postgresql.org/patch/6379/ >=20 >=20 > Fairly easy to review in its current form. >=20 > I've included my changes as a patch over your version 1. Hi David, Thank you very much for the careful review. Your edits make the = documentation clearer and more fluent, and I agree with most of your = suggestions. >=20 > The main points of interest: >=20 > 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. Maybe the original phrasing =E2=80=9Chas no effect=E2=80=9D wasn=E2=80=99t= clear for what I meant. What I was trying to express is that ONLY is = intended to control whether an action propagates to child tables: with = ONLY it should not propagate, and without ONLY it should. For these particular sub-commands, however, the observed behavior is = that they behave the same with or without ONLY. =46rom a documentation = perspective, stating that explicitly could help avoid user confusion. Separately, I do have a plan to tighten this behavior in the future: for = these commands, specifying ONLY would raise an error instead. If such a = change is merged later, the documentation note could naturally be = removed at that point. So I=E2=80=99d like to keep the statement for now, but I=E2=80=99m very = happy to adjust the wording if you have a clearer phrasing to suggest. I saw you removed such =E2=80=9Chas no effect=E2=80=9D from = =E2=80=9CDISABLE/ENABLE RULE=E2=80=9D, =E2=80=9CDISABLE/ENABLE ROW LEVEL = SECURITY=E2=80=9D, =E2=80=9CNO FORCE ROW LEVEL SECURITY=E2=80=9D, and , = and retained some. >=20 > I tried to keep the "and 'is implicitly " verbiage = consistent throughout. "Implicitly present" just seems off regardless = of consistency. Agreed. >=20 > "new partitions created in the future" - this is wordy given that = "new" implies "created in the future". Went with a simple "Newly = created partitions". Agreed. >=20 > 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. The current documentation already mentions the behavior of newly created = partitions in some sections. For example: SET ACCESS METHOD ``` When applied to a partitioned table, there is no data to rewrite, but = partitions created afterwards will default to the given access method = unless overridden by a USING clause. ``` SET TABLESPACE ``` When applied to a partitioned table, nothing is moved, but any = partitions created afterwards with CREATE TABLE PARTITION OF will use = that tablespace, unless overridden by a TABLESPACE clause. ``` I think this helps users quickly understand the important implications = for future partitions. >=20 > 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. >=20 I saw you changed =E2=80=9Cindependently=E2=80=9D to =E2=80=9Cseparately=E2= =80=9D, I agree with that part. For ONLY, as explained above, I want to = retain the statement. > 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. >=20 Agreed. > 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. That=E2=80=99s true. Agreed. >=20 > It didn't seem necessary to point out that the obsolete backward = compatible syntax for OIDS doesn't apply to partition-related tables. Agreed. >=20 > 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. As mentioned above, the current documentation already describes the = behavior of newly created partitions in some sections, so I would prefer = to retain these mentions for now. That said, I=E2=80=99m happy to wait = for more opinions. Before I integrate your edits and prepare v3, I=E2=80=99d appreciate = hearing your thoughts on the points about ONLY and =E2=80=9Cnewly = created=E2=80=9D. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/