Thread
-
Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
Dmitry Koval <d.koval@postgrespro.ru> — 2026-05-13T20:47:13Z
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