Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
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>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2024-04-28 14:09:09
Message-ID: CAKFQuwao0EgGe9C5cPwr1e=9nkabiJRCyMAwNo5hjKebjZFoeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sunday, April 28, 2024, Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:

>
> When we deal with mixed ownership, say, bob is an owner of a
> partitioned table, but not an owner of a partition, should we
> allow him to perform merge with that partition?
>
>
Attaching via alter table requires the user to own both the partitioned
table and the table being acted upon. Merge needs to behave similarly.

The fact that we let the superuser break the requirement of common
ownership is unfortunate but I guess understandable. But given the
existing behavior of attach merge should likewise fail if it find the user
doesn’t own the partitions being merged. The fact that the user can select
from those tables can be acted upon manually if desired; these
administrative commands should all ensure common ownership and fail if that
precondition is not met.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2024-04-28 14:54:16 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message David G. Johnston 2024-04-28 13:42:59 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands