public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kirill Reshke <[email protected]>
To: Alexander Korotkov <[email protected]>
Cc: jian he <[email protected]>
Cc: zengman <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Sat, 20 Dec 2025 16:37:57 +0500
Message-ID: <CALdSSPgj0+Bp0DujZmsX-xVq=k85E2OXNsvKqoak8EU7xpFVYA@mail.gmail.com> (raw)
In-Reply-To: <CAPpHfduDafmBYttv6ZMacq6qpjcyOjrUOC=7DVb4_nURiWLRzQ@mail.gmail.com>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
<CAPpHfdsh_jPZ6-2JtWoFeZravVQYY4cYCcnKXQW6KxEx+F5vxg@mail.gmail.com>
<[email protected]>
<CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CACJufxET9Qe-=zJtjGrKPr7-1QbVcP9y-vJU9CMEDfPGt_dbyg@mail.gmail.com>
<[email protected]>
<CACJufxEBvrtcOWyX2NMwOCvb2ZvaRGaGeiMQpUD=yxL6ncBFOg@mail.gmail.com>
<[email protected]>
<CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com>
<[email protected]>
<CAPpHfduQwwa4ytK-dGjRGN0fTWfpWNNysYuUKrOetsyGioBMfA@mail.gmail.com>
<[email protected]>
<CAPpHfdvpzezTnuumpdJYge=x1TbhgAkjMGh2GHnScf5SFsf2ew@mail.gmail.com>
<[email protected]>
<CAPpHfdtBH5YhAiKhXPcLAE4CCRMaGKqupzx8u2RKEm2aQ_e3Xw@mail.gmail.com>
<CA+gpmfLSELzEKEzSFXeLkRRMGkRfm2+7ewXHyW-8ZWPbWOywyg@mail.gmail.com>
<CAPpHfdtnWkesztu4qq1m8RfuR2OYXd5tbPyaHk-3Db2szWrb=Q@mail.gmail.com>
<CAPpHfdta0DMb3XjePJJWf1xbAndE8w2uYPaWEOFBGQ=xsDkfiQ@mail.gmail.com>
<[email protected]>
<CAPpHfdvt64X0F3thjC0q9vOTU-JqG2M_MJfEeA2-_=odNOA3Dg@mail.gmail.com>
<[email protected]>
<CAPpHfdu8wPv6hes7v95fF__N1pkPG1yS3YumKUGmS_jdF2RtrA@mail.gmail.com>
<CALdSSPj6ixZC2EaTgJU_2BNhgjsg_8665x2-pDzcEoc-PRueAA@mail.gmail.com>
<CAPpHfdudzb96AOCPsyWAJnMdj-QU3xCt52PHzLbz4scbzio7sQ@mail.gmail.com>
<CACJufxEJhJvPP-j1iTDCmD+HO14b8ZiTys+sJN8mJxDnL5BpRQ@mail.gmail.com>
<CAPpHfduDafmBYttv6ZMacq6qpjcyOjrUOC=7DVb4_nURiWLRzQ@mail.gmail.com>
On Sat, 20 Dec 2025 at 16:27, Alexander Korotkov <[email protected]> wrote:
>
> On Sat, Dec 20, 2025 at 1:15 PM jian he <[email protected]> wrote:
> > On Sat, Dec 20, 2025 at 6:42 PM Alexander Korotkov <[email protected]> wrote:
> > >
> > > Hi Kirill!
> >
> > > > reshke=# alter table only z merge partitions (z_1,z_2) into z_12;
> > > > ALTER TABLE
> > > > reshke=#
> > > >
> > > > ```
> > > >
> > > > IMO "alter table only ... merge partitions" does not make perfect
> > > > sense and should be rejected rather than executed. WDYT?
> > >
> > > Could you, please, clarify your point? I didn't quite get it. It
> > > looks like pretty basic example of merging two adjacent partitions.
> > >
> >
> > > reshke=# alter table only z merge partitions (z_1,z_2) into z_12;
> > I think it should fail, because we are not applying to table "z" itself,
> > For Split/Merge partitions, we are processing the whole partitioned
> > table z hierarchy.
> >
> > alter table z merge partitions (z_1,z_2) into z_12;
> > should work.
> >
> > I guess the attached maybe is what Krill wants.
Jian, Thank, you got me right. Your patch is addressing the problem I
talk about, yes. The only issue about your patch is the actual error
message (error hint is exactly on point.)
So, instead of
```
+ERROR: ALTER TABLE MERGE PARTITIONS must apply to child tables too
+HINT: Do not specify the ONLY keyword.
``
I would prefer (something like)
```
+ERROR: ALTER TABLE MERGE PARTITIONS is a non-recursive command.
+HINT: Do not specify the ONLY keyword.
``
On Sat, 20 Dec 2025 at 16:27, Alexander Korotkov <[email protected]> wrote:
> I don't think the problem with ONLY keyword is
> that MERGE/SPLIT must be always recursive. I think opposite, it's
> always non-recursive and this is why ONLY is meaningless. Otherwise,
> we may decide to just leave it as it allowing ONLY.
+1
--
Best regards,
Kirill Reshke
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], [email protected]
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
In-Reply-To: <CALdSSPgj0+Bp0DujZmsX-xVq=k85E2OXNsvKqoak8EU7xpFVYA@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