Re: Fix SPLIT PARTITION bound-overlap bug and other improvements - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
Date
Msg-id 4B04275C-E044-4EEE-BE64-6FEEE73DCBB0@gmail.com
Whole thread
In response to Re: Why is the LSN reported for pg_logical_emit_message() different from other decoded operations?  (solai v <solai.cdac@gmail.com>)
Responses Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
List pgsql-hackers

> On May 18, 2026, at 17:16, Alexander Korotkov <aekorotkov@gmail.com> wrote:
>
> On Mon, May 18, 2026 at 2:15 AM Chao Li <li.evan.chao@gmail.com> wrote:
>>> On May 18, 2026, at 05:45, Alexander Korotkov <aekorotkov@gmail.com> wrote:
>>>
>>> Hi, Chao!
>>>
>>> On Thu, May 14, 2026 at 9:59 AM Chao Li <li.evan.chao@gmail.com> wrote:
>>>> To make this patch easier to process, I split it into 4 commits:
>>>>
>>>> 0001 - Fixes the bound-overlap bug
>>>> 0002 - Fix the incorrect HINT message for the DEFAULT case
>>>> 0003 - Fix the incorrect description about combined bound in the SGML doc
>>>> 0004 - Reject only-create-default-partition usage
>>>
>>> Thank you for your work.  I've revised the patchset.
>>> 0002 - I've also fixed gramma of hints in other branches
>>> 0004 - In the check_split_partition_not_same_bound(), calling
>>> partition_bounds_create() and partition_bounds_equal() looks a bit
>>> heavyweight.  It doesn't matter much performance-wise, but it feels
>>> like start processing from scratch while we're on quite late stage
>>> already.  I've replaced that with more lightweight check.  Also I
>>> removed dealing with memory context.  This code implies small
>>> non-repetitive memory allocations which only lives during DDL
>>> operation, no need to wrap them with memory context as we don't do so
>>> in other places.
>>>
>>> Any objections if I commit this?
>>>
>>> ------
>>> Regards,
>>> Alexander Korotkov
>>> Supabase
>>
>> Hi Alexander,
>>
>> Thanks for the revisions. I think you may have missed the attachments, so I cannot review the changes.
>
> Sorry. Here it is.
>
> ------
> Regards,
> Alexander Korotkov
> Supabase
>
<v3-0003-Clarify-SPLIT-PARTITION-bound-requirements-in-doc.patch><v3-0001-Fix-SPLIT-PARTITION-range-bound-validation-with-D.patch><v3-0002-Fix-SPLIT-PARTITION-hint-for-DEFAULT-partition-bo.patch><v3-0004-Reject-degenerate-SPLIT-PARTITION-with-DEFAULT-pa.patch>

v3-0001 through v3-0003 look good to me.

For v3-0004, I have a suspicion, but it's late here and my brain is getting slow, so I would like to study it more
tomorrow.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Nico Williams
Date:
Subject: Re: Support LIKE with nondeterministic collations
Next
From: Srinath Reddy Sadipiralla
Date:
Subject: Re: pg_recvlogical: honor source cluster file permissions for output files