Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2024-04-18 17:03:21
Message-ID: 87plumiox2.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexander Lakhin <exclusion(at)gmail(dot)com> writes:

> Hi Alexander,
>
> 18.04.2024 13:35, Alexander Korotkov wrote:
>>
>> The revised patchset is attached.
>> 1) I've split the fix for the CommandCounterIncrement() issue and the
>> fix for relation persistence issue into a separate patch.
>> 2) I've validated that the lock on the new partition is held in
>> createPartitionTable() after ProcessUtility() as pointed out by
>> Robert. So, no need to place the lock again.
>> 3) Added fix for problematic error message as a separate patch [1].
>> 4) Added rename "salemans" => "salesmen" for tests as a separate patch.
>>
>> I think these fixes are reaching committable shape, but I'd like
>> someone to check it before I push.
>
> I think the feature implementation should also provide tab completion for
> SPLIT/MERGE.
> (ALTER TABLE t S<Tab>
> fills in only SET now.)

Here's a patch for that. One thing I noticed while testing it was that
the tab completeion for partitions (Query_for_partition_of_table) shows
all the schemas in the DB, even ones that don't contain any partitions
of the table being altered.

- ilmari

Attachment Content-Type Size
0001-Add-tab-completion-for-ALTER-TABLE-SPLIT-MERGE-PARTI.patch text/x-diff 2.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-04-18 17:08:49 Re: Add notes to pg_combinebackup docs
Previous Message Justin Pryzby 2024-04-18 16:52:02 Re: pg17 issues with not-null contraints