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: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2025-06-03 10:12:28
Message-ID: CAPpHfduH83+CW1dBppFVjxauPFGC+-ux+Y7wB0koZJCs029SXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Dmitry!

On Tue, May 20, 2025 at 1:36 AM Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> wrote:
> Changes in patches:
>
> 1) Added usage of SECURITY_RESTRICTED_OPERATION for SPLIT/MERGE
> PARTITION(S) commands.
>
> 2) For SPLIT PARTITION command: new partitions will have the same owner
> as the parent.
>
> 3) For MERGE PARTITIONS command: if merged partitions have different
> owners, an error will be generated.

Some notes to the patch.
1) I think we need explicitly document who is the owner of the new
partition(s). The documentation for MERGE command says all the merged
partitions should have the same owner. Good, but also we need to
state that the new partition should have the same owner. Same to the
SPLIT command.
2) I think we also need to describe what happens not just with
ownership, but with ACLs. We currently don't do anything to them, so
basically we discard existing ACLs. It's probably OK, and we could
introduce options for ACL handling later. But we need to state in the
docs that it's user responsibility to setup ACL on new partition(s).

------
Regards,
Alexander Korotkov
Supabase

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-06-03 10:16:12 Re: Proposal: Limitations of palloc inside checkpointer
Previous Message Alexander Korotkov 2025-06-03 09:58:24 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands