public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alexander Korotkov <[email protected]>
To: Dmitry Koval <[email protected]>
Cc: jian he <[email protected]>
Cc: [email protected]
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Thu, 5 Jun 2025 04:41:47 +0300
Message-ID: <CAPpHfdugpFGUk-udjcroJLi6_5ypS9-3CxoC+MbRvpjncDy11w@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
<CA+TgmoY0=bT_xBP8csR=MFE=FxGE2n2-me2-31jBOgEcLvW7ug@mail.gmail.com>
<CAPpHfdtp3_H_Rp1ubVYGUnnF0fXbam7+OOG_EMnWos1x2a_3Zg@mail.gmail.com>
<[email protected]>
<CA+TgmoZux8hzQ0=1-Rvigm9VuojW0aHiGSzL+G_g43qyrLGiSg@mail.gmail.com>
<[email protected]>
<CAPpHfdtXDuBaHscJn-wada6Kaf3fxmS4k-1TTVhpS+Kx=uveyw@mail.gmail.com>
<[email protected]>
<CAPpHfdv2V2tsvVn5LYyrJkzmPA==vbdCEKiT8j9yaaiDTfaQtA@mail.gmail.com>
<[email protected]>
<CALDaNm3V5DQSbZGxhYH+3MMMm-YdgOg+RdJ-ni6D0TZx_=Xd7w@mail.gmail.com>
<[email protected]>
<CAPpHfduH83+CW1dBppFVjxauPFGC+-ux+Y7wB0koZJCs029SXA@mail.gmail.com>
<[email protected]>
<CACJufxEi_JVg+=_BSS0o+TYUE_Hq+jmga_yxxuKLSGbQiAnZDg@mail.gmail.com>
<[email protected]>
Hi Dmitry!
On Wed, Jun 4, 2025 at 10:44 PM Dmitry Koval <[email protected]> wrote:
> Thank you very much for review.
Thank you for your work on this patch. I have some additional notes on
this patch.
Why don't you use *existing_relation_id argument of
RangeVarGetAndCheckCreationNamespace(), when it is called from
createPartitionTable() and ATExecSplitPartition()? This argument provide
an elegant way to find a duplicate table with the same name.
It also seems that 0002 patch has the following error message, which aren't
experienced in the regression tests.
+ datum = list_nth(spec->upperdatums, abs(cmpval) - 1);
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("upper bound of partition \"%s\" is not
equal to upper bound of split partition",
+ relname),
+ parser_errposition(pstate, datum->location));
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("new partition \"%s\" cannot have this value
because split partition does not have",
+ relname),
+ parser_errposition(pstate, overlap_location));
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("new partitions do not have value %s but split
partition does",
+ searchNull ? "NULL" :
get_list_partvalue_string(notFoundVal)));
+ ereport(ERROR,
+
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("DEFAULT partition should be
one"),
+ parser_errposition(pstate,
sps->name->location));
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("one partition in the list should be DEFAULT because
split partition is DEFAULT"),
+ parser_errposition(pstate, ((SinglePartitionSpec *)
linitial(partlist))->name->location));
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+ errmsg("new partition cannot be DEFAULT because DEFAULT
partition already exists"),
+ parser_errposition(pstate, spsDef->name->location));
+ ereport(ERROR,
+ errcode(ERRCODE_CHECK_VIOLATION),
+ errmsg("can not find partition for split partition
row"),
+ errtable(splitRel));
------
Regards,
Alexander Korotkov
Supabase
view thread (178+ 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: <CAPpHfdugpFGUk-udjcroJLi6_5ypS9-3CxoC+MbRvpjncDy11w@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