From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Date: | 2025-09-16 08:52:02 |
Message-ID: | CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 16, 2025 at 6:11 AM Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> 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;
Attachment | Content-Type | Size |
---|---|---|
v56-0001-refactor-v56-check_partitions_for_split.no-cfbot | application/octet-stream | 17.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-09-16 09:03:23 | Re: Cannot find a working 64-bit integer type on Illumos |
Previous Message | Peter Smith | 2025-09-16 08:47:14 | Re: Add support for specifying tables in pg_createsubscriber. |