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.94.2) (envelope-from ) id 1s15vA-009Ogg-4R for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Apr 2024 14:54:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s15v6-00DFK1-M8 for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Apr 2024 14:54:25 +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.94.2) (envelope-from ) id 1s15v6-00DFJt-81 for pgsql-hackers@lists.postgresql.org; Sun, 28 Apr 2024 14:54:25 +0000 Received: from charmander.telsasoft.com ([50.244.222.1] helo=pryzbyj2023.telsasoft) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s15uz-000T3Y-Ry for pgsql-hackers@lists.postgresql.org; Sun, 28 Apr 2024 14:54:23 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id 23FD82ECF; Sun, 28 Apr 2024 09:54:16 -0500 (CDT) Date: Sun, 28 Apr 2024 09:54:16 -0500 From: Justin Pryzby To: Alexander Korotkov Cc: Dmitry Koval , Alexander Lakhin , Robert Haas , Tomas Vondra , Alvaro Herrera , pgsql-hackers@lists.postgresql.org Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Message-ID: References: <56e0000c-6b39-44ce-90b4-d3c3062e408c@postgrespro.ru> <5dee3937-8e9f-cca4-11fb-737709a92b37@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 28, 2024 at 08:18:42AM -0500, Justin Pryzby wrote: > > I will explore this. Do we copy extended stats when we do CREATE > > TABLE ... PARTITION OF? I think we need to do the same here. > > Right, they're not copied because an extended stats objs on the parent > does something different than putting stats objects on each child. > I've convinced myself that it's wrong to copy the parent's stats obj. > If someone wants stats objects on each child, they'll have to handle > them specially after MERGE/SPLIT, just as they would for per-child > defaults/constraints/etc. I dug up this thread, in which the idea of copying extended stats from parent to child was considered some 6 years ago, but never implemented; for consistency, MERGE/SPLIT shouldn't copy extended stats, either. https://www.postgresql.org/message-id/20180305195750.aecbpihhcvuskzba%40alvherre.pgsql -- Justin