Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uEOZ9-007OZV-6x for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2025 08:31:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uEOZ8-00EMfJ-9c for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2025 08:31:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uEOZ7-00EMfA-RP for pgsql-hackers@lists.postgresql.org; Mon, 12 May 2025 08:31:13 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uEOZ1-001Ol2-2C for pgsql-hackers@lists.postgresql.org; Mon, 12 May 2025 08:31:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1747038664; bh=2AZ+fjpg0aY8/1ssrXJPaEd5Q/3lG07SCYSx4AAvhj0=; h=Message-ID:Date:User-Agent:Subject:To:References:From:In-Reply-To: From; b=CJgWPwhIsTlVu49tO2pNphpRXsgmGWMRkK8pkYrpcff8uyObWZ3h6V/bI05mHAZKm 8/4T0Xm0sf7VQrU47+hhlkIxnA9yq9v4AcwD7rMhjjZh000WAG/PeIQYqPpeXoPAGl p+9xY/7LS/8WAxm356VHHpwxOuVj+WFIBnTzuyoGTj9kNPEjw8LpNBTr2EnxnssMJw FYuPcIm/nq7/tw0puvqvrt6wlxh7Yb+gc0kANIcc2f3odWgBXnrn5Afto8Mb4XygGt cw+imbtTBY4PqaQH4/ozpNb/A0yyIqNqB66tL+8K4Y3is5T3xCb7H4cu/R9yJbQCC3 elbti9cMeTmhg== Received: from [172.30.48.202] (unknown [93.174.131.138]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: d.koval@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 89DF460858 for ; Mon, 12 May 2025 11:31:04 +0300 (MSK) Message-ID: Date: Mon, 12 May 2025 11:31:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: pgsql-hackers@lists.postgresql.org References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <859476bf-3cb0-455e-b093-b8ab5ef17f0e@postgrespro.ru> <4e2764f7-f6be-478f-8d7f-f921dbd10f5f@postgrespro.ru> Content-Language: en-US From: Dmitry Koval In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-KSMG-AntiPhishing: NotDetected, bases: 2025/05/12 08:20:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/05/12 05:44:00 #27973461 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi! We (with colleagues) discussed further improvements to SPLIT/MERGE PARTITION(S). As a result of the discussion, the following answers to the questions remained: 1. Who should be the owner of new partitions (SPLIT PARTITION command) if owner of the partition being split is not the same as the current user? a) current user (since he is the one who creates new tables); b) the owner of the partitioned partition (since it is the owner of the table and should continue to own it). 2. Who should be the owner of the new partition (MERGE PARTITIONS command) if the partitions being merged have different owners? a) current user (since he is the one who creates new table); b) merging of partitions should be forbidden if they have different owners. Please, advise what seems to be the best solution for points 1 and 2. With best regards, Dmitry Koval Postgres Professional: http://postgrespro.com