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-05-21 12:30:01
Message-ID: ba5eaa35-cd85-43d6-95b3-8cf211fd6b67@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

>per https://www.postgresql.org/docs/current/sql-altertable.html
>"You must own the table to use ALTER TABLE."
>That means the current user must own the to be SPLITed partition.

Last statement may be incorrect (if the logic is different).
Current user can attach another user's partition. If current user can
change (attach) another user's partition, why can't he split the
partition? After attach, partition is part of current user's table, and
current user can change his own table. (Moreover, the owner of the new
partitions is the same as the owner of the split partition.)

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-05-21 12:34:20 Re: Make wal_receiver_timeout configurable per subscription
Previous Message Julien Rouhaud 2025-05-21 12:19:56 Re: Add comment explaining why queryid is int64 in pg_stat_statements