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 1vkE2B-00Bzql-21 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 04:17:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkE2A-006Fbe-2J for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 04:17:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkE2A-006FbS-1N for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 04:17:02 +0000 Received: from mail-dl1-x122b.google.com ([2607:f8b0:4864:20::122b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vkE28-002KKQ-0x for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 04:17:01 +0000 Received: by mail-dl1-x122b.google.com with SMTP id a92af1059eb24-1233702afd3so5532261c88.0 for ; Sun, 25 Jan 2026 20:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769401020; x=1770005820; 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=e2vp5emwP105pJw6LYlNI4vkIUmOs40yZ45ftg6Lun8=; b=nGDoQQgnASGOLEzkQVeZOwWFH9bE4KL+uzsbDAoYQkUC+nihXmViFmgMWiKF9SGri4 DSOysGyqnyJXb5T1DqEyYmH3qBFsMCnqmJtG0U0LYwMiEEqQKWsOkjGM0uVe9VJYmuOT lsdIcKeXLvyW/YoGwxMKEWgjVn299g/VVJI+KlxZwCGajiiiMW7WnHJPHlOAPx2PVP/N LO4x352d9E4Tqc2/IGtuEsjMGzPVUBkmAorj5r1pf6TPdv0TBMsX8XfGHF3eatMU9MHZ jFy5fmCmeaANedDhoZsthb1OZ1AQI3gZQpUgMYoqnTEHX2R9CfMLTWI3ypW4bjCeamRR ZKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769401020; x=1770005820; 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=e2vp5emwP105pJw6LYlNI4vkIUmOs40yZ45ftg6Lun8=; b=N/7PmqIHHiLK4FjiaV8cIYRwMRJ4IMIIXhWQURGmmVy4ijjsO1Kcd/yGaPDt+SObDF s2MzK8tc0S20dR3fioO4zF3Jd9N7fF2r10ksXmEJ51x22U3F9MHa/p1nXZRyWva9uo36 AoGy+doJYQzG2dMoOTbcc+3HmaLIsh7rGPfS+o7hI/beMovhP73kEsMU4PFLX3MaQVjq KzQw1C3gsUeqkQShvMsmUAnAd3f8vuQOssnGP2lE1/dRuajAJTzPZw4ex/InY2KVVNQr caXRN7bpXJGj6XeVhDDQ/jHekq97MAxkOb6aBToE5H8PtBUqcFwDYSRC4IkRhAbJHDpY Jcew== X-Forwarded-Encrypted: i=1; AJvYcCXQ32qKUEz8McPfR4FuW9yshuAOPRbe3hmOmwLtVbWhKgt8BbejI3vART1eY1ArjjHCWimkNeqNDf1BZYsL@lists.postgresql.org X-Gm-Message-State: AOJu0YyUitdKpuoix5U755gRldgLevbmF4MbtzieGd0M3VDmoFOUFnQD wG6DC6i0BBTeLShaWz/UpuCxlMyOYqUxMhM3TbgzPnc4x+zxULROSWoJ X-Gm-Gg: AZuq6aJu7Vi/JE3/7hVt6lotkAqIjBTAheGFQ2nMJPYptaQfdqND3pDs4I9wrlodsXr JMk4eR41quyRih4LSVukJW4YRklsJHUpQNv2TmhpoG49tpC7+JiYTNYVulcP08vLpNdRxZBn4Pr ng8jcJl3Sudo6naQJnZzjtUeYRHwSWAR+Io531KHU9oGK5IMtskROGJC19L9/PClcwhM+rHlHcd zimdvt/5msiqARALzUztuJf10hgDB6qMQmDQYrNpUo4ciLNCpcrT4bcgN1ZBp3ERE0GCYSa8xTK kEZoqwlhfTbWq8rRSdr31Ryfd5YDXQHAZ2BYVaCWh32VJRL+TznXyrMGovhQTjDnKQusd3f6+4y rJRKHitt6z4DRci7/FyNGsFldTy4CvObqrm8NShLRm+916zH9QGMMvTnK8Gu5xUiiRH72BQuLea tPmv2lOB6X+zvlklFqbw== X-Received: by 2002:a05:7022:511:b0:119:e55a:9beb with SMTP id a92af1059eb24-1248ebf7ec1mr1500212c88.7.1769401020087; Sun, 25 Jan 2026 20:17:00 -0800 (PST) Received: from smtpclient.apple ([64.32.14.230]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1247d9a4698sm15969072c88.16.2026.01.25.20.16.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2026 20:16:59 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables From: Chao Li In-Reply-To: Date: Mon, 26 Jan 2026 12:16:24 +0800 Cc: Zsolt Parragi , Postgres hackers , Amit Kapila Content-Transfer-Encoding: quoted-printable Message-Id: <4ADB3A71-86B2-46FA-AC27-E5BA4E3FF1A1@gmail.com> References: <90F9169D-135C-45E5-8221-4F79DAED98E2@gmail.com> <46DA7611-C18D-4782-AEFF-F861ECDEFA5C@gmail.com> <245AA9F3-7577-46D6-990C-C308A9F36E82@gmail.com> To: "David G. Johnston" X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jan 24, 2026, at 09:16, David G. Johnston = wrote: >=20 >=20 > On Fri, Jan 23, 2026 at 5:57=E2=80=AFPM David G. Johnston = wrote: >=20 > "A nonrecursive DROP COLUMN (i.e., ALTER TABLE ONLY ... DROP COLUMN) > never removes any descendant columns, but instead marks them as > independently defined rather than inherited." >=20 > This part is now undocumented, it was only mentioned in this = paragraph. >=20 > True, it's left implied instead of explicitly stated. Any column that = exists on a child but not the parent is by definition "independently = defined". So if either ONLY is supplied or the rules for cascading = delete are not met the result is children with independently defined = columns with that name. >=20 > The original note was wrong anyway for the two-parent case - the = second parent prevents the marking as independent when the first = parent's column is dropped. >=20 > Decided to test this one and I see the original wording was correct = and we will need to keep a note that in the two-parent ONLY case the = un-dropped children are marked both dependent and independent. >=20 > Change: >=20 > > For inheritance setups, a descendant column is removed only if = both of the > following are true: this is the only parent defining the column, = and the column > was never independently defined in the descendant. > >=20 > To: >=20 > "For inheritance setups, a descendant column is removed only if all = the following are true: ONLY is not specified, no other parent defines = the column, and the column is not marked as having been independent. = Otherwise, the descendant column is instead marked as having been = independent. >=20 > If we think that deserves a bit longer explanation about that/why/how = a column can be both dependent and "having been independent" we should = cross-reference to a more appropriate location. Here we just state this = is one way that condition can materialize. >=20 > David J. >=20 Thanks a lot for the test. Included in v7. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/