public inbox for [email protected]
help / color / mirror / Atom feedFrom: jian he <[email protected]>
To: Dmitry Koval <[email protected]>
Cc: Alexander Korotkov <[email protected]>
Cc: [email protected]
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Tue, 16 Sep 2025 16:52:02 +0800
Message-ID: <CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
<[email protected]>
<CACJufxEWtK3utKjd7yMxRTGE54dJ8B+uigqvt1ocA4Q1mQ8qiQ@mail.gmail.com>
<[email protected]>
<CAPpHfdsW5_rFLwTfkYuG42nX5RbJCVhaC2vkn8p5GsT8Lseuyw@mail.gmail.com>
<[email protected]>
<CACJufxGEa6ZxP6d5VjZ6-Rpx=+u9zEE9ioRZRqQ=d_HYY6+daQ@mail.gmail.com>
<CACJufxGh=L6YPr37Y4t+ZfReBeWdv8aiNEk7VoyhYyP7d6L-4w@mail.gmail.com>
<CACJufxE4o-m9Eu0OX33aUgfTVT3p7b3u242-CCJaOpWUaFhS=A@mail.gmail.com>
<CACJufxEH45Rtkn=n9hjakeKEkH7ou8domh+iQHMp+18Wq_L-4g@mail.gmail.com>
<[email protected]>
<CACJufxGWCVf5r9kE-z6MyR2b+wkaU15Q5m2tKz4cvBhYX3-x1g@mail.gmail.com>
<[email protected]>
<CAPpHfdshkf0C2h09S00TVB8h3x8UT+GZyQ6LK2WGg1hOjnNE4g@mail.gmail.com>
<CAPpHfdsh_jPZ6-2JtWoFeZravVQYY4cYCcnKXQW6KxEx+F5vxg@mail.gmail.com>
<[email protected]>
On Tue, Sep 16, 2025 at 6:11 AM Dmitry Koval <[email protected]> wrote:
>
> 7) Additionally, I've made a numerous and small fixes for grammar to the
> docs directly to the patchset.
>
v56-0002, SPLIT PARTITION check_partitions_for_split is way too overwhelming.
Similar to transformPartitionCmdForMerge, we can put some error handling code
to transformPartitionCmdForSplit.
please check the attached refactoring.
in v56-0001
+ Oid newPartitionOid = InvalidOid;
+
+ foreach_oid(mergingPartitionOid, mergingPartitions)
+ {
+ if (mergingPartitionOid == existingRelid)
+ {
+ newPartitionOid = mergingPartitionOid;
+ break;
+ }
+ }
can simplified to
if (list_member_oid(mergingPartitions, existingRelid))
newPartitionOid = existingRelid;
Attachments:
[application/octet-stream] v56-0001-refactor-v56-check_partitions_for_split.no-cfbot (17.2K, ../CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com/2-v56-0001-refactor-v56-check_partitions_for_split.no-cfbot)
download
view thread (165+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
In-Reply-To: <CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox