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 1s4pCX-001Gfc-IO for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 21:51:49 +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 1s4pCV-002vOK-Mh for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 21:51:48 +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 1s4pCV-002vOB-CK for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 21:51:47 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s4pCS-0004o8-W5 for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 21:51:46 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-dc236729a2bso285965276.0 for ; Wed, 08 May 2024 14:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715205104; x=1715809904; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=W1lEI8PhwrAHMEwX89THtpFXxOa6FwwnunwAlTBQwVo=; b=G1QRc9lkQgcuGG7MyP0CiZb2rgj+1KCNav0jnTFVd83D1pqKhZ0fia44933qG9bwLS Mx1zfHAeTwezu9Zz8cB48xzEkB2GC+CvPS81xdPIQbwTL9X08PCM/tUfDARvluKomy9p gmrplvF+zHc0aBboGFTzE8Y7qX4rFb3TKIyqI2AkJIwB1muUqoz5CDM08DN3brYCz+Dn qQ6/v+5CxpK7DXn3VSRF015SRas3FY+FUPWdfixCXaAdulhFRUeMIiIucDxd5AiOgiwU 7gzrKvVQGOX/qt5F/eMDPNcB3ukndl/+HNE0W7kA7OQJhxD6AF6XPNRo77wESKvDq7UU /KIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715205104; x=1715809904; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W1lEI8PhwrAHMEwX89THtpFXxOa6FwwnunwAlTBQwVo=; b=DE/FpXfxkz2e+WAYuMcmgdBz3FQBQKjVD64nM+watUkZUp/KuyvJFsRPjuzFKmORbm pmYDIQzS3vj06TToVdaYGpdw43lw7lrrBWQATWDivRoIuOcIIBs83g5LPVi4Qx/NQqh5 YCRK+FRZinuTidvwmcmxLDaYUcjbP6YUIR/xJCcq6YJG2jkOk+4dct1RpDRJMue8/Rsl w6erazZd9cKAJO/LrHO1Ig60tNy+xfMrjDGQTb/GTddPqgIc3olQYtImRVUWibnP2/r4 qv4b1T6KkxQ2qvdNs2VkgLX/od46IFY6Yqpgjfn8A80Ge5uEP5a5awFEVVTS8SJSsQO4 iFeg== X-Forwarded-Encrypted: i=1; AJvYcCXbOmfDl/aQlKqRh6H0CcWz3EB0o/AvwwWCRWVTA6PWu71bEPeK/MfiYfeh7nGNSil1sYSXwygwJnIofeF85EMM88XUllM1WDvp/ACxkczXpQBx X-Gm-Message-State: AOJu0YzDPhMX2JL9lYdIWct/OYtvVQQ+0jzgL/cdIVViu9pdkKrLm2A2 euP358dVQ0nGiiq1ycjhrc0AKL1H4yEE0aMqnHejdBg3wQ3ba2739sB1Qx8O0Cw63lcRDT3i6kj tPXCfOpeu+YI4g7/piv0GTcNWr/k= X-Google-Smtp-Source: AGHT+IF6lpVSd4w1MaehSKaYAXp+NcR5UKraxFCiN1NLcUCjYjRSxc30SisSuTC0Vhx0IxCIef14KeBj22opvbvNtkw= X-Received: by 2002:a25:b10f:0:b0:dda:a7e5:e4f0 with SMTP id 3f1490d57ef6-debb9e4f387mr3955155276.61.1715205103942; Wed, 08 May 2024 14:51:43 -0700 (PDT) MIME-Version: 1.0 References: <0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com> <41117807-3bea-45bc-a9c0-743c29abff2d@postgrespro.ru> In-Reply-To: From: Alexander Korotkov Date: Thu, 9 May 2024 00:51:32 +0300 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Justin Pryzby Cc: Dmitry Koval , Alexander Lakhin , pgsql-hackers@lists.postgresql.org, Tomas Vondra , Alvaro Herrera Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 9, 2024 at 12:37=E2=80=AFAM Justin Pryzby wrote: > > On Wed, May 08, 2024 at 09:00:10PM +0300, Alexander Korotkov wrote: > > On Fri, May 3, 2024 at 4:32=E2=80=AFPM Alexander Korotkov wrote: > > > On Fri, May 3, 2024 at 4:23=E2=80=AFPM Justin Pryzby wrote: > > > > On Wed, May 01, 2024 at 10:51:24PM +0300, Dmitry Koval wrote: > > > > > 30.04.2024 23:15, Justin Pryzby =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > > > > Is this issue already fixed ? > > > > > > I wasn't able to reproduce it. Maybe it only happened with ear= lier > > > > > > patch versions applied ? > > > > > > > > > > I think this was fixed in commit [1]. > > > > > > > > > > [1] https://github.com/postgres/postgres/commit/fcf80c5d5f0f3787e= 70fca8fd029d2e08a923f91 > > > > > > > > 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 co= mments. > > commit message: > > Currenlty =3D> Currently > partiions =3D> partitios > copying =3D> by copying Thank you! > > > However, parent's table extended statistics already covers all its > > children. > > =3D> 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 Yes, I understand that parents pg_statistic entry with stainherit =3D=3D true includes statistics for the children. I tried to express this by word "covers". But you're right, this is the wrong explanation. Can I, please, ask you to revise the patch? > I think EXCLUDE IDENTITY can/should now also be removed - see 509199587. > I'm not able to reproduce that problem anyway, even before that... I will check this. ------ Regards, Alexander Korotkov Supabase