Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiIaM-00075Q-LJ for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2022 16:58:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oiIaK-0006ho-6N for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2022 16:58:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiIaJ-0006he-Rd for pgsql-hackers@lists.postgresql.org; Tue, 11 Oct 2022 16:58:27 +0000 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oiIaH-0001X0-EL for pgsql-hackers@lists.postgresql.org; Tue, 11 Oct 2022 16:58:26 +0000 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-35711e5a5ceso132776037b3.13 for ; Tue, 11 Oct 2022 09:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ulRjPjtOpPcI71YPHl2iczDkTxUKiGW0UsXXKo1oowI=; b=f+CQdlBpeKLCq1V0IzowVbOuggmOAkTQ2R2TVdOsD+rW6NLB8O4ixsVD0EYO5f39Jk FLvew4f38ZQBZGUg+qxx6+Le+TGdLPR9LXrQMVRzyIIoY2oejaiDJdU7ZK63bjDHw4YV tlwSaoEeLUnscN5i2N/Z65KqpjJ4mTc0JPuV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=ulRjPjtOpPcI71YPHl2iczDkTxUKiGW0UsXXKo1oowI=; b=t0RduL6IHq5Plbac/tZtCbK7PO6BZPoFqZG6cJZSseqnAwH1kBO26xAiwS6rpE+jJ/ 1nGBQOblplwIVL5PNv3FuSd3h7dJhnRQNqUyK2sl1Hic5GoSYuMqUlxeHbUTqZUDWfsL 02+wswbiP+meRWVzNhzCj6UfU6ruaWo0sR09Odf+dCV8RpA54gdq0Sq1JkLIA01ohZhb FFE0bXRoVFx96HvewkRhmIP5NLCcsbTuNAP0kRVy+GKwR1snxjHCftz2heBeEyEIacRS Cx5z8w675ajVSBKues7gIcbclWJkjG+ygAiuWlzhrRls0fiZvUgSs8wS+Dz9xgowjwyQ 2TFA== X-Gm-Message-State: ACrzQf17OaLRzGgXHalOlEIqtn52vrbQvEjgleZBEmZ1KpnUW///U87l hOg8JSrBI8UaET92ZUxv9CYpbluxi/Y1xjdpYIO4HLQFX5zxPw== X-Google-Smtp-Source: AMsMyM5Gk/gPHNz1iRocpvLFaFj/bTue96WdOQoC9wcsMlVZLOm/+uf9eQxu9fwg63g5pnC3otxUGoB1eXe+eDw/MUQ= X-Received: by 2002:a81:4510:0:b0:355:45e2:4c30 with SMTP id s16-20020a814510000000b0035545e24c30mr21922833ywa.325.1665507504591; Tue, 11 Oct 2022 09:58:24 -0700 (PDT) MIME-Version: 1.0 References: <163714495450.16056.3566953095730878367@malur.postgresql.org> <9186127e-8f8f-cbd3-40de-b7bf01e57fb5@postgrespro.ru> In-Reply-To: <9186127e-8f8f-cbd3-40de-b7bf01e57fb5@postgrespro.ru> From: Zhihong Yu Date: Tue, 11 Oct 2022 09:58:01 -0700 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Dmitry Koval Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000002ea65c05eac52f54" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002ea65c05eac52f54 Content-Type: text/plain; charset="UTF-8" On Tue, Oct 11, 2022 at 9:22 AM Dmitry Koval wrote: > Hi! > > Fixed couple warnings (for cfbot). > > -- > With best regards, > Dmitry Koval > > Postgres Professional: http://postgrespro.com Hi, For v12-0001-PGPRO-ALTER-TABLE-MERGE-PARTITIONS-command.patch: + if (equal(name, cmd->name)) + /* One new partition can have the same name as merged partition. */ + isSameName = true; I think there should be a check before assigning true to isSameName - if isSameName is true, that means there are two partitions with this same name. Cheers --0000000000002ea65c05eac52f54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Oct 11, 2022 at 9:22 AM Dmitr= y Koval <d.koval@postgrespro.r= u> wrote:
Hi!

Fixed couple warnings (for cfbot).

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Hi,
For=C2=A0v12-0001-PGPRO-ALTER-TABLE-MERGE-PARTITIONS-command.patch:

+ =C2=A0 =C2=A0 =C2=A0 if (equal(name, cmd->name))
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* One new partition can have the same n= ame as merged partition. */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 is= SameName =3D true;

I think there should be a check= before assigning true to isSameName - if isSameName is true, that means th= ere are two partitions with this same name.

Cheers= =C2=A0
--0000000000002ea65c05eac52f54--