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 1uHw9v-00CeYX-S5 for pgsql-hackers@arkaria.postgresql.org; Thu, 22 May 2025 02:59:51 +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 1uHw9u-00ELF1-Nl for pgsql-hackers@arkaria.postgresql.org; Thu, 22 May 2025 02:59:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHw9u-00ELEs-Ec for pgsql-hackers@lists.postgresql.org; Thu, 22 May 2025 02:59:50 +0000 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHw9r-000FKN-2g for pgsql-hackers@lists.postgresql.org; Thu, 22 May 2025 02:59:49 +0000 Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-87c02437d02so2256269241.3 for ; Wed, 21 May 2025 19:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747882786; x=1748487586; 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=5cI24AYaMUuf9QoxXkcrv4Z/8/h84i53LviWl/cbetg=; b=WlnkBbkafw3q3j19/fvSEJ2ajWXKyl0164DPX9ZaNc2N57Hey5tQ5WPWwpbV/sWjEU x0Yxqwtb9QtXB0Y2KBdhqDAeq5VhNTgI3ChLEnFZqTJjO/N57tDaBBv+SBwb3T8+1Xi9 UfT1lLUiyzJoB5zpA/sEwxy+Ad0yqRlZmd39uOzDugpgrnKBibEdMle+NyaC5O6ufJY4 GzFBagLCCKnYo4m+guMTIhXzjsmePgzc3/ZyXeqm0O33Ilo7G9duiT1OFaYU+AwmEgf0 Mmj970joOcrIf7OXpGCj3Ur+Sr0v/FQtWqMpJqpIQfgSyfWac0Mt7rRqUll9IrvBuN6j zZTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747882786; x=1748487586; 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=5cI24AYaMUuf9QoxXkcrv4Z/8/h84i53LviWl/cbetg=; b=aW6HUbRzERA67Gtt0pldvHLUfDUK20/E1Pd3GJCH9ppiTIgh4aZPOKD8sO14mEZObB SXmUEIlTOYsi/bTwjUumXC0Llr/+6mcSVKYvezbaEP0eY6OYNJCNGKDhdHR8jjWuXLKa JCP3Bk7ZIkjz9CZYY/GlSqsmXHIQI35t1Eh6KDDoIfUUD8JpW+QGGUsJ5/PZBI/SW6zU ympC7afS93n+B7UmoN6vPO0WMXV/3hUHl3osTfFnG+QCd8ZJDNyW3qKntXxpiwzaHWAH dTeNVtNxgqm3+1142nNO8TR/RnOBljr94qmKd2GgzjRx2e0vompyg53HzjhNxHgR4gTp s6+A== X-Gm-Message-State: AOJu0YxRsP8zTeVpIo7SSW8qWginTahARVBeHM7zf72b11qkZfIdVI5y dG/W1ckJanBQiSdUy+95tqrmEZAARUwbRqKe9u6FDp3X0vHfKaXwXn8sRv7PvvdQQutlxOs9puS Cl4J/iB/Xrb6xp8lUlvlSV/YeP32aC88M5rXwbpdktjwu X-Gm-Gg: ASbGncvEu62/QzZhLtekbY915ojmd5dMVdAIWF2yCw0Up2sIhtVlbKjGQO7r8cZWQ+n 4ijCuDIi93SOkF7Qqtekhj1mWALS/PxjXYpfqhaPi+NNeoUg6gZ6KYeM8X3hVYnLYrqgOgEJcHa yBdRCx+b1zno/pW7qoiwmiY6IHbI8S+B3ZMtMds5ZtvbYDn6KWYGq5aSSK2+VR X-Google-Smtp-Source: AGHT+IEmuCnGGtKGO13JKRuzn4tjHuToqA78dvOUseuTKLTluxe4NCorn69gav2jS6atpaL0XJbkWgOjeKck+Ye8+Pw= X-Received: by 2002:a05:6102:c0e:b0:4db:10c6:319f with SMTP id ada2fe7eead31-4dfa6bf8c2amr23218120137.19.1747882786391; Wed, 21 May 2025 19:59:46 -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> <4469cb4d-5820-4cc8-9848-7b9b5934a600@postgrespro.ru> In-Reply-To: <4469cb4d-5820-4cc8-9848-7b9b5934a600@postgrespro.ru> From: jian he Date: Thu, 22 May 2025 10:59:10 +0800 X-Gm-Features: AX0GCFstEmuwC8HZqcb7eQxisl2mKNZ29CIsZaDTEJS8s8SgK6WTrS6470YuvBY 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 On Thu, May 22, 2025 at 1:01=E2=80=AFAM Dmitry Koval wrote: > > > for example: > > ... > > If in both examples you replace > > create role bob; > > with > > create role bob SUPERUSER; > > and in the second example add "set role bob;" before "alter table ..." > query, then no error will be occur. > That is fine. superuser can bypass all permission checks. superuser can attach any table to the partitioned table as he wants. for example: begin; create role alice SUPERUSER; create role bob SUPERUSER; GRANT all privileges on schema public to alice; GRANT all privileges on schema public to bob; set role bob; create table at_partitioned (a int, b text) partition by range (a); set role alice; create table at_part_2 (b text, a int); set role bob; alter table at_partitioned attach partition at_part_2 for values from (1000) to (2000); rollback; Am I missing something?