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 1vj4mf-005lHQ-1o for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jan 2026 00:12:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vj4md-00FMya-0i for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jan 2026 00:12:15 +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 1vj4mc-00FMyS-2y for pgsql-hackers@lists.postgresql.org; Fri, 23 Jan 2026 00:12:15 +0000 Received: from mail-dy1-x132c.google.com ([2607:f8b0:4864:20::132c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vj4ma-001qRP-1o for pgsql-hackers@lists.postgresql.org; Fri, 23 Jan 2026 00:12:14 +0000 Received: by mail-dy1-x132c.google.com with SMTP id 5a478bee46e88-2ae2eb49b4bso4100287eec.0 for ; Thu, 22 Jan 2026 16:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769127132; x=1769731932; 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=YBP8DEpXYP4abx0rzgiJM4tN3qieQ11cEHruAh8asWw=; b=ju9NeJ7IRHCgval5XhxMCeLTYAWvo0/6Mu/F9RAlDUq4rtaW/IRrq9IAfkwDjdE0iU 3Ka8YrWMxYck9DLRx4nE+BJH6Z16+orKRRjqRG69D1ggU/9Kg6T+Qv++V1jP4ljqWxwn Ue0HnaFah18JSaekrZ5eBTdxOEuvxESRWr2/IXs1zhzLQVpAhUi3TG61kYf+FZveQXtq UkvbhqJEFSfhu8vwHBQ7loj25+nUeTrDEwo4QmIm4EtS7nFQ5VtXNGFdPSq7S9aTOEBn YGZ/qhHhzxKfD2B5FxIinyn28JFnqeFFb/3MLqWVUBDIGcAcIHShJ3hgLVvRFj09uPnV Nrgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769127132; x=1769731932; 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=YBP8DEpXYP4abx0rzgiJM4tN3qieQ11cEHruAh8asWw=; b=qc/iPt3Nr0dZYeJXZMWM+FEUkJgFwesNbRADR5PiLDnVjpKfnie5nnBWIPjzkX2QU9 hSrQXDsHGHoJ0+cRYnAUbxjwoTtmzoVQWdth7HbRWtY8YWRv0QbPfrgqH2CPUjxOC40k Lra0NMeHPXful6OZTiFz4CWbs7cpNXKCfeE2wuanbOozUSLF8i6se4ODSPrqlGcgyevn xaCIvTVZ3cP3TXGJphbUYqFQ/sZvCtBdqGBektH10XLfJEztpeW6XrHoiV4H9IY3xDum DjKC+6ZEfDKkFacJbbFNRqPaIfXPIpf/t/WLN57l2g/TsJZ2kyftFD7ZJ9KMGH2bHBZx 8h6Q== X-Forwarded-Encrypted: i=1; AJvYcCWSFf7pgyAratpntxCEmNnhXQVRS7UDoWTmW1676VlLwXksagOuF9U6NOn0NQGMyea9IhBxD80Qx+hR2b8O@lists.postgresql.org X-Gm-Message-State: AOJu0YyFWRZjuW8EzqnXxJ0MWsVxWqtGKXQfIpK7cRXTYUIQgapOYU7n N1IpHZGG3G+kYqipsK1F4GexGwORCDmCky/WlN43Sduw7f3HwuP7YY6C X-Gm-Gg: AZuq6aJ3ajVXTge5eO+OHMwKttTMDwMk3pAqWV9S9rKs6klrku2Wt8koOmdsSpKQ7fq vcZ9EjJo/q5iCrd158SsRUFjpmM76XTqUTLTkygkSUlgpeu+a1dnuVNUdQRsZqt8BO9W6ktQ+fs 2fnvPZADkXra06NvPLZEL9AC6FPT663rzWOYZYnVHOKaYtqPsdqeEoK0gSINmV0evs3b9I1U6DR hRFAhfNVmfX0yCQNtFbPz5K0Kr15ZUvm+cMND/gbqRLRPa3ouvAtR7zcF2rVq57TXLk9sZJMVQa trP2zGYrKu4CBfVOijHkah7tLmz109voG3GEs6rIT4VTCe6/qIekSbNkx2GliaqUfE7ZX8/xVQJ o33+hgon9BnvftY+yntvqaNg+ashIOVCgrEvh07GS1AEKX1seXEcRlPHt3QYEyjzIkskOhMl2S0 QaqtnYJgTh0FU6EOX2iZnF X-Received: by 2002:a05:7300:dc94:b0:2af:7429:e538 with SMTP id 5a478bee46e88-2b739be6957mr630242eec.43.1769127132080; Thu, 22 Jan 2026 16:12:12 -0800 (PST) Received: from smtpclient.apple ([196.247.24.158]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b73a6b6227sm1146145eec.8.2026.01.22.16.12.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2026 16:12:11 -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: ALTER TABLE: warn when actions do not recurse to partitions From: Chao Li In-Reply-To: Date: Fri, 23 Jan 2026 08:11:35 +0800 Cc: "David G. Johnston" , Greg Sabino Mullane , Postgres hackers Content-Transfer-Encoding: quoted-printable Message-Id: <8ECD9403-F0BB-4971-94CF-2709EEB4E3B9@gmail.com> References: <6eff5e43-cacd-4a2a-ad1d-e3b313c86050@uni-muenster.de> <950BB7B5-0180-4C36-82A0-7E17B920F740@gmail.com> To: Jim Jones 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 23, 2026, at 03:27, Jim Jones = wrote: >=20 > Hi Chao >=20 > On 22/01/2026 06:45, Chao Li wrote: >> evantest=3D# alter table p_test replica identity full, alter column >> username set (n_distinct =3D 0.1); >> NOTICE: ALTER action REPLICA IDENTITY on relation "p_test" does not >> affect present partitions >> HINT: partitions may be modified individually, or specify ONLY to >> suppress this message >> NOTICE: ALTER action ALTER COLUMN ... SET on relation "p_test" does = not >> affect present partitions >> HINT: partitions may be modified individually, or specify ONLY to >> suppress this message >> ALTER TABLE >=20 >=20 > One could argue that encapsulating all conditions in > EmitPartitionNoRecurseNotice(), meaning it is called all the time, is > slightly inefficient, but the impact is really negligible in this case = - > and it is how it is done in similar functions in tablecmds.c :) The = code > LGTM. Hi Jim, thanks a lot for the review. >=20 > One small thing: >=20 > errhint is supposed to be capitalised - see Error Message Style = Guide[1] Thanks for the info, I wasn=E2=80=99t aware of that. When I wrote the = code, I searched =E2=80=9Cerrhint=E2=80=9D over the source tree, and = didn=E2=80=99t find a standard to follow. >=20 > "Detail and hint messages: Use complete sentences, and end each with a > period. Capitalize the first word of sentences. Put two spaces after = the > period if another sentence follows (for English text; might be > inappropriate in other languages)." >=20 > ereport(NOTICE, > errmsg("ALTER action %s on relation \"%s\" does not affect present > partitions", > action_str, > RelationGetRelationName(rel)), > errhint("partitions may be modified individually, or specify ONLY to > suppress this message")); >=20 > What about this? >=20 > HINT: To update partitions, apply the command to each one = individually, > or specify ONLY to suppress this message. Looks good. I will integrate your edit to the next version. >=20 > I'll test the newly covered subcomands tomorrow. Thanks again for testing. I will wait to see the test results and = address all issues together in next version. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/