Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5bwz-0004ox-SA for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 00:18:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5bwy-0002ub-Ge for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 00:18:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5bwy-0002uS-40 for pgsql-hackers@lists.postgresql.org; Thu, 15 Dec 2022 00:18:12 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5bwv-0002H4-8P for pgsql-hackers@postgresql.org; Thu, 15 Dec 2022 00:18:10 +0000 Received: by mail-pj1-x1035.google.com with SMTP id js9so8735948pjb.2 for ; Wed, 14 Dec 2022 16:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=rhVsC44/3LtFDUBcTGiwU8Ho15p36HWL8JTQe3UR5hE=; b=LNxK5cg9B7ATmeqpvGZTXtKF3rGceDI1OrRsJ4TeHoNBeY+mKKaj43TM97C1bOLYTq rH2V1EuI+/TE8aDdDrQXGZbPAafg/kcdHD1Ke250sR1oh1DUKFkm2Hry/Kr4f137w/GF y1CtPQHooc9xVcXzU4g5fyKB1kNSzyGBbEam7wKWropdhqyhkVa786sG+W6leehWnNRb Pc3PYjxxpVeZUhgoIC8evV9PtOZIHdsN4f+B42hk4fzIud7u45+ZZFyF4B+osZF3t1zr QJnbpC7NRlTtWGgslndGuUqc0g7F9pB4dqxVZXq5SVO1LQCT/HoHjpbIrF5R3c8Oe9sd B7SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rhVsC44/3LtFDUBcTGiwU8Ho15p36HWL8JTQe3UR5hE=; b=0Tpuuy8ld0aoNFJG94h1cUrFtfqzUtc+plHt1uxXXMlin2Cz9G2W5k7pPkKnHRgwXS w+rTMTsrdKYid6vy+H1buqIFDgmFBaPoOr9Yzk1svxbxcQ3ieeJ4StKLVYP4JBmof0e5 26V2zcxS65Avm7R8hKoPjlOJXOKDHBsN92k3tLAPhab1+o1a1nHnvJOMWXcsDpLvKlym xx4UqOq4M3gHT/hxE8X3ub7Ob7TW6HhPhgo0fzOUzKNkN8a74Moq+vuXT22r+Ub+Wegh wOtRBL6guOYa7civ3uhlTbGB9muC2D965uh+hSmDzKkaqkvvenYTpL92O1tFkkZcLBVO /eFQ== X-Gm-Message-State: AFqh2koF2LCbYAXlWvvn7JnoMna6NDdk9hkgwbWYvbusuSJqkkzqVTZ7 tCIaoPbh270e4wZ/Hy10DWqlWA== X-Google-Smtp-Source: AMrXdXtRz8GsMW2jOZj81nOTh+HzusKyHYpPuCuz2O8p7aw4XuAis+dDd+ynzYmf2QVkRoSq9ZiOBg== X-Received: by 2002:a05:6a20:9b85:b0:af:8e92:8540 with SMTP id mr5-20020a056a209b8500b000af8e928540mr936050pzb.1.1671063488162; Wed, 14 Dec 2022 16:18:08 -0800 (PST) Received: from jeff-laptop.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id y184-20020a6264c1000000b00575acb243besm435778pfb.1.2022.12.14.16.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 16:18:07 -0800 (PST) Message-ID: Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX From: Jeff Davis To: Justin Pryzby , Pavel Luzanov Cc: Nathan Bossart , pgsql-hackers@postgresql.org Date: Wed, 14 Dec 2022 16:18:05 -0800 In-Reply-To: <20221214221140.GA1153@telsasoft.com> References: <20221208183707.GA55474@nathanxps13> <210dc2cc663934f8b463e4effa9af86225e46ce4.camel@j-davis.com> <20221210204109.GA197392@nathanxps13> <20221212200427.GA448418@nathanxps13> <20221212210136.GA449764@nathanxps13> <20221214032332.GA671806@nathanxps13> <8f7172da-2b58-3bd0-97ae-5126e2a7970c@postgrespro.ru> <20221214221140.GA1153@telsasoft.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2022-12-14 at 16:11 -0600, Justin Pryzby wrote: > Yeah, but: >=20 > regression=3D> insert into p1 values (1); > ERROR:=C2=A0 permission denied for table p1 > regression=3D> select * from p1; > ERROR:=C2=A0 permission denied for table p1 Right, that's what I had in mind: a user is only granted operations on the partitioned table, not the partitions. It happens that an INSERT or SELECT on the partitioned table flows through to the partitions, whereas the VACUUM ends up skipping them, so I guess the analogy could be interpreted either way. Hmmm... Thinking about it another way: logical partitioning is about making the table logically one table, but physically many tables. That would imply that the privileges should apply per-partition. But then that doesn't make a lot of sense, because what maintenance can you do on the partitioned table (which itself has no data)? There's definitely a problem with this patch and partitioning, because REINDEX affects the partitions, CLUSTER is a no-op, and VACUUM/ANALYZE skip them. --=20 Jeff Davis PostgreSQL Contributor Team - AWS