Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2025-09-22 20:12:20
Message-ID: dbe8e3ac-0b85-4809-bfaf-1d11f3c9d814@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Jiah He!

1.
>duplicated CommandCounterIncrement call?

Probably this duplication is necessary to rename partition correctly ...

2.
>we can simply call deparse_expression. so I removed the
>get_list_partvalue_string.

I agree. This looks better.

3.
>partitions_lists_intersection
>will get all the common Const nodes in two
>PartitionBoundSpec->listdatums.
>but that's expensive, and we only need the first common Const location
>for error reporting, so I refactored it too.

Ok. If a universal function is needed in the future,
partitions_lists_intersection can be modified.

4.
> I also heavily refactor the test again....

Thanks! Applied with minor changes.

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment Content-Type Size
v61-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch text/plain 170.3 KB
v61-0002-Implement-ALTER-TABLE-.-SPLIT-PARTITION-.-comman.patch text/plain 234.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-09-22 20:17:09 Re: Updating IPC::Run in CI?
Previous Message Nathan Bossart 2025-09-22 20:05:44 Re: [PATCH] Hex-coding optimizations using SVE on ARM.