public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dmitry Koval <[email protected]>
To: Chao Li <[email protected]>
To: PostgreSQL-development <[email protected]>
Cc: Alexander Korotkov <[email protected]>
Subject: Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
Date: Wed, 13 May 2026 23:47:13 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Hi, Chao Li!

Thank you for the bug report, test script, and fix!

 >> 0. A bound-overlap bug

I think this fix should be applied without much discussion:
------------------------------------------------------------------------
diff --git a/src/backend/partitioning/partbounds.c 
b/src/backend/partitioning/partbounds.c
index 9b4277a4987..8b8f90569fe 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -5419,7 +5419,8 @@ check_partition_bounds_for_split_range(Relation 
parent,
                                                                 "ALTER 
TABLE ... SPLIT PARTITION"),
  
parser_errposition(pstate, exprLocation((Node *) datum)));
                 }
-               else
+
+               if (last)
                 {
                         PartitionRangeBound *split_upper;
------------------------------------------------------------------------

 >> 1. The documentation about splitting with a DEFAULT partition is a 
bit unclear
 >>  ...
 >> 2. I found this hint message confusing:
 >> ...

Unfortunately, I cannot comment on these points; it would be good to get 
the opinion of people who know English well.


 >> 3. SPLIT PARTITION currently provides another way to add a DEFAULT 
partition:
 >> ...

Agreed, this is another way to add a DEFAULT partition. But I'm not sure 
that this way should be disabled (using the special function 
check_split_partition_not_same_bound)...
Maybe it's better to keep it "as is"?

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com





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]
  Subject: Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
  In-Reply-To: <[email protected]>

* 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