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 1s4oz4-001FAc-8X for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 21:37:54 +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 1s4oz1-002q3l-FL for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 21:37:51 +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 1s4oz0-002q3d-RR for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 21:37:51 +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 1s4oyy-0004hl-7L for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 21:37:49 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id 0EB482E0D; Wed, 8 May 2024 16:37:46 -0500 (CDT) Date: Wed, 8 May 2024 16:37:46 -0500 From: Justin Pryzby To: Alexander Korotkov Cc: Dmitry Koval , Alexander Lakhin , pgsql-hackers@lists.postgresql.org, Tomas Vondra , Alvaro Herrera Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Message-ID: References: <0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com> <41117807-3bea-45bc-a9c0-743c29abff2d@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 08, 2024 at 09:00:10PM +0300, Alexander Korotkov wrote: > On Fri, May 3, 2024 at 4:32 PM Alexander Korotkov wrote: > > On Fri, May 3, 2024 at 4:23 PM Justin Pryzby wrote: > > > On Wed, May 01, 2024 at 10:51:24PM +0300, Dmitry Koval wrote: > > > > 30.04.2024 23:15, Justin Pryzby пишет: > > > > > Is this issue already fixed ? > > > > > I wasn't able to reproduce it. Maybe it only happened with earlier > > > > > patch versions applied ? > > > > > > > > I think this was fixed in commit [1]. > > > > > > > > [1] https://github.com/postgres/postgres/commit/fcf80c5d5f0f3787e70fca8fd029d2e08a923f91 > > > > > > I tried to reproduce it at fcf80c5d5f~, but couldn't. > > > I don't see how that patch would fix it anyway. > > > I'm hoping Alexander can confirm what happened. > > > > This problem is only relevant for an old version of fix [1], which > > overrides schemas for new partitions. That version was never > > committed. > > Here are the patches. > 0002 Skips copying extended statistics while creating new partitions in MERGE/SPLIT > > For 0002 I'd like to hear some feedback on wordings used in docs and comments. commit message: Currenlty => Currently partiions => partitios copying => by copying > However, parent's table extended statistics already covers all its > children. => That's the wrong explanation. It's not that "stats on the parent table cover its children". It's that there are two types of stats: stats for the "table hierarchy" and stats for the individual table. That's true for single-column stats as well as for extended stats. In both cases, that's indicated by the inh flag in the code and in the catalog. The right explanation is that extended stats on partitioned tables are not similar to indexes. Indexes on parent table are nothing other than a mechanism to create indexes on the child tables. That's not true for stats. See also my prior messages ZiJW1g2nbQs9ekwK@pryzbyj2023 Zi5Msg74C61DjJKW@pryzbyj2023 I think EXCLUDE IDENTITY can/should now also be removed - see 509199587. I'm not able to reproduce that problem anyway, even before that... -- Justin