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 1vj0Kq-003XTY-2T for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 19:27:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vj0Kp-00EJKW-2Y for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 19:27:16 +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 1vj0Kp-00EJKO-1P for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 19:27:15 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vj0Kn-001xUO-1T for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 19:27:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1769110033; x=1800646033; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=k0X9+zZHxfwxwN+ZPG2HkO48OmlXf3Cm7t7ifA1sSPA=; b=GWwA4sg0qy9XOqlln/SmpBaYTh5WlKDBP0T7ChHIRK1hCIsMaNzHrCFJ GJnYctHL56bt9V7ynUpDg9C9FeuRVOV59EIifK3Wotj2fsT5byqSGU3w7 e5APx7bM4ZlaFiNqRY26IwTVw3KXKB35vVHNtM8enERwN/e/nPajG0sbk OCgztYAyiNHuX7yn6An0jChjhweLp2TjG0xZ2Omd/AgSRUERqLeRDJJfZ CneW/18gFpv9w00fChUUH9sAi8cankeKruSdyFDcvXRhb3wCxKlGSTeqX yFLmRQ75sJOO+tVQfMoKEeVP9yBgxvLnfvO8yeIrpQK4ryU8SM94joa1t A==; X-CSE-ConnectionGUID: ZygSL+0WT7efDD85BKnpAg== X-CSE-MsgGUID: tnKDAok8SaiJySp11LT8ZQ== X-IronPort-AV: E=Sophos;i="6.21,246,1763420400"; d="scan'208";a="382168331" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 22 Jan 2026 20:27:12 +0100 Received: from [192.168.178.27] (dynamic-093-131-154-158.93.131.pool.telefonica.de [93.131.154.158]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 3693420ADF10; Thu, 22 Jan 2026 20:27:12 +0100 (CET) Message-ID: Date: Thu, 22 Jan 2026 20:27:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: ALTER TABLE: warn when actions do not recurse to partitions To: Chao Li Cc: "David G. Johnston" , Greg Sabino Mullane , Postgres hackers References: <6eff5e43-cacd-4a2a-ad1d-e3b313c86050@uni-muenster.de> <950BB7B5-0180-4C36-82A0-7E17B920F740@gmail.com> Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Chao On 22/01/2026 06:45, Chao Li wrote: > evantest=# alter table p_test replica identity full, alter column > username set (n_distinct = 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 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. One small thing: errhint is supposed to be capitalised - see Error Message Style Guide[1] "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)." 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")); What about this? HINT: To update partitions, apply the command to each one individually, or specify ONLY to suppress this message. I'll test the newly covered subcomands tomorrow. Best, Jim 1 - https://www.postgresql.org/docs/current/error-style-guide.html