Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id CAPpHfdtVp5Xxz59Zse+Gg_oWvZPpwjr+gcVtWq-5pTp0Rsh8gQ@mail.gmail.com
Whole thread
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Pavel Borisov <pashkin.elfe@gmail.com>)
Responses Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
List pgsql-hackers
Hi, Pavel!

On Tue, Jun 16, 2026 at 12:57 AM Pavel Borisov <pashkin.elfe@gmail.com> wrote:
> I looked into the patch. It's simple enough and looks good to me.
> I have one question: is it correct to pass 0 reloptions to
> NewRelationCreateToastTable or we need to use transformRelOptions +
> heap_reloptions pair to derive toast_reloptions as it is done in
> ProcessUtilitySlow() and create_ctas_internal()?

Yes, (Datum) 0 is correct here.  MERGE/SPLIT PARTITION grammar
provides no syntactic way for the user to specify reloptions for the
new partitions, so there is nothing to extract via
transformRelOptions.  This matches createPartitionTable() itself,
which already calls heap_create_with_catalog(... reloptions=(Datum) 0
...) for the main relation a few lines above; the TOAST table just
inherits that choice.

Extending the syntax to accept WITH (...) on new partitions would be a
separate, larger feature.  Out of scope for this bug fix.

------
Regards,
Alexander Korotkov
Supabase



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: IGNORE/RESPECT NULLS can be specified for (prokind == 'f').
Next
From: Tomas Vondra
Date:
Subject: Re: Adding basic NUMA awareness