Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2025-10-27 12:13:36
Message-ID: CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 22, 2025 at 11:12 PM Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
wrote:

> Hi, Jiah He!
>
> 1.
> >duplicated CommandCounterIncrement call?
>
> Probably this duplication is necessary to rename partition correctly ...
>

The second CommandCounterIncrement() is needed to make the renamed relation
visible within our transaction. Why do we need the first one? I see tests
pass without it.

Also, I doubt this is correct in the partitions_listdatum_intersection()
function.

foreach_node(Const, val1, list1)
{
if (val1->constisnull)
{
if (isnull2)
{
result = lappend(result, val1);
return result;
}
isnull1 = true;
continue;
}

The branch handling null value in the outer loop, uses null2 flag from the
inner loop. I think for the null value of the outer loop we still need to
run inner loop to search for the matching null value.

------
Regards,
Alexander Korotkov
Supabase

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Vinter 2025-10-27 12:22:12 Re: Resetting recovery target parameters in pg_createsubscriber
Previous Message Aleksander Alekseev 2025-10-27 12:13:33 Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments