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 1uMOde-00AXgH-LU for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jun 2025 10:12:58 +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 1uMOdd-001elZ-2Y for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jun 2025 10:12:57 +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 1uMOdc-001elR-Ny for pgsql-hackers@lists.postgresql.org; Tue, 03 Jun 2025 10:12:56 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uMOdZ-000BeB-3B for pgsql-hackers@lists.postgresql.org; Tue, 03 Jun 2025 10:12:55 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ad1d1f57a01so176407766b.2 for ; Tue, 03 Jun 2025 03:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748945572; x=1749550372; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=krlB37DHhWUALgMadBytLgFQdOo9okDFOR/v8JpBWgA=; b=Qw7JGcL3y0bN1OBguHSC45vZArFd4VIyZAiCzjEwJqBQOU2SreGRKMd2TfFCtuXBnw vRZbE6UWtREtcatDFZkPf9+Rf3C7ukoDRYKY23e1NoYv53i38O68ckfoWvM30/EGTdn1 +WDgn1ZsNZVCFMJusLam6W4SN+E7wpCfbr0mNcJo9L+bL5yGPSONyd9e/K8uk4wN2bhe 5QIWbiCPb1T05sydOtLFxMJV8nwzzx4lOMaxWk0+Wcmqgxv2m2W/cnxO4jaIzwxOKCGV cAonISLl5pJ8XtxD+GBKc6N/0TWJWyn/8UbabetjiDVpj44RC2HIlPWyXGePfR79HlXs zfMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748945572; x=1749550372; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=krlB37DHhWUALgMadBytLgFQdOo9okDFOR/v8JpBWgA=; b=w1gyJCME/jFzHjEk5Vjm0yvJG51sW68Mfyo3UVawXblXkOjXEjNiJY2oERB+5CEH8Z D+rVWOq4V3I4RNJmTa11NPzT0ZrYQWiFKA8sqwkiZEatsT+V+x3HS2ouWl5mKBQwKjEa iTpLWst3CvNFjgbRdrTFdb9dnz8DLkDh2phsdwzzHQvZbRdM8PDilWRl3Zg8lgiUCRMU pdyWOX0x1WHedR99hV+0nrONEgL7kuGBSG6dQXNy1NnyV4EaIT9bQQ1oDX0FD6aLuFNe gZUNsCcyEwoCZoHvQlW9MuM8eb+LoKeT1U+81eH0Thg9zzkna2QzCjMgH5El5AXJ4uVz 6GEQ== X-Gm-Message-State: AOJu0Yzr6iFp7iuFpt79dW+Efg8dra+5ekp55wYVWUvie2fV0GEw+MdW k7PhAFp4kYQtG3zhctY8yX8GV+g2PyEYK2VdpVfgz4xBxNJQJTvzXFEOttll9LkfHT7xyW/zsti PhPBAz6WXE0Vsxi4ohrrDB5WUiOmbCxj4/qb/WYR1pw== X-Gm-Gg: ASbGncsx0gfzJN91GyowuugPAEPnCDNoCUf97fKrxwjMNQrn5ClGpMiHgjWuH4V4qyC kI4Ohf74ErBbhbkxhHjNEZjCO7jJm1bZu/n2VRwjvoEW3SL7BFsWxIEHDcbLH7SE3RDpnaIqHVs Oz74OiCRZnm7hW8Hj+cI+/PdX7L2wvdJx0 X-Google-Smtp-Source: AGHT+IGL1mMsZViyPCvpTo9wQt3lUFm2p7PdwQoxZ7eRKNhx1BbzU/7KTh39tBXT4LPtHC0o6NhpxbaxAWxcbVt3UC4= X-Received: by 2002:a17:907:9285:b0:ad8:9257:5735 with SMTP id a640c23a62f3a-adb32264a13mr1612658166b.3.1748945561704; Tue, 03 Jun 2025 03:12:41 -0700 (PDT) MIME-Version: 1.0 References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <859476bf-3cb0-455e-b093-b8ab5ef17f0e@postgrespro.ru> <4e2764f7-f6be-478f-8d7f-f921dbd10f5f@postgrespro.ru> <7fdaf3e8-4c05-4739-bee6-98acc068d1c7@postgrespro.ru> In-Reply-To: <7fdaf3e8-4c05-4739-bee6-98acc068d1c7@postgrespro.ru> From: Alexander Korotkov Date: Tue, 3 Jun 2025 13:12:28 +0300 X-Gm-Features: AX0GCFst1DQh4qnXHvqF_4WK6zRea9bQg2Fybzs0ffDCLcQ5HNh3g0_PrfkB-U0 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Dmitry Koval Cc: pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Dmitry! On Tue, May 20, 2025 at 1:36=E2=80=AFAM Dmitry Koval 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