| From: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
| Subject: | Re: Fix SPLIT PARTITION bound-overlap bug and other improvements |
| Date: | 2026-05-13 20:47:13 |
| Message-ID: | 4df20e70-a083-4334-9548-5f8b9025847c@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Henson Choi | 2026-05-14 00:08:04 | Re: [PATCH] Add pg_current_vxact_id() function to expose virtual transaction IDs |
| Previous Message | Robert Haas | 2026-05-13 20:20:21 | Re: Avoid orphaned objects dependencies, take 3 |