public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Korotkov <[email protected]>
To: Dmitry Koval <[email protected]>
Cc: jian he <[email protected]>
Cc: [email protected]
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Mon, 27 Oct 2025 14:13:36 +0200
Message-ID: <CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
	<CACJufxEH45Rtkn=n9hjakeKEkH7ou8domh+iQHMp+18Wq_L-4g@mail.gmail.com>
	<[email protected]>
	<CACJufxGWCVf5r9kE-z6MyR2b+wkaU15Q5m2tKz4cvBhYX3-x1g@mail.gmail.com>
	<[email protected]>
	<CAPpHfdshkf0C2h09S00TVB8h3x8UT+GZyQ6LK2WGg1hOjnNE4g@mail.gmail.com>
	<CAPpHfdsh_jPZ6-2JtWoFeZravVQYY4cYCcnKXQW6KxEx+F5vxg@mail.gmail.com>
	<[email protected]>
	<CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CACJufxET9Qe-=zJtjGrKPr7-1QbVcP9y-vJU9CMEDfPGt_dbyg@mail.gmail.com>
	<[email protected]>
	<CACJufxEBvrtcOWyX2NMwOCvb2ZvaRGaGeiMQpUD=yxL6ncBFOg@mail.gmail.com>
	<[email protected]>

On Mon, Sep 22, 2025 at 11:12 PM Dmitry Koval <[email protected]>
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


view thread (165+ messages)  latest in thread

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], [email protected]
  Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
  In-Reply-To: <CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com>

* 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