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 1q9b8S-00078V-Ja for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2023 00:46:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9b8R-0003Aq-C6 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2023 00:46:47 +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 1q9b8Q-0003AK-JI for pgsql-hackers@lists.postgresql.org; Thu, 15 Jun 2023 00:46:47 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9b8N-002Fj8-MB for pgsql-hackers@postgresql.org; Thu, 15 Jun 2023 00:46:45 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D1FA95C01A1; Wed, 14 Jun 2023 20:46:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 14 Jun 2023 20:46:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1686790002; x=1686876402; bh=AL vDdE292pbZGpB9d4duBEt3hAd5j6lY1hrDwX8xvSI=; b=2ijxdQq6JptvG22nIa 3FG0d6pBIuP/5ElIODeg2yhPF4vSvHkQUqVeCcIqqtuOemca3/py+exo7iVRpbvI v6TVcxjOaJwRWnXbgFS12bNCsP3X2CWHzcz9FHIxnxZLjk/l9TCYDPZc8Gjv9u8X oWXr9yDmX9gSq20CwTf6jY4MoKCpFA33R3aOIgQ0vaNBkP+F10VZFEIQiUgsfX2N gQ9TfxaZKXM+gzyBk6+syvJKlHPvSrxGUYyXM4zFldu6klJxii7CnNrz8Ghru/R1 TXDjakp6yrM58/phpT3Gf5cPVUqGP3q5XFwHjtRlg9yx1vnUMwVmybczckvxyKqN 9SUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686790002; x=1686876402; bh=ALvDdE292pbZG pB9d4duBEt3hAd5j6lY1hrDwX8xvSI=; b=BLWZFIB2ujEDs+mf4YtpeIs/Ie31c AkpDFs2046eKuaAYfHvW2ZXOtkbG+03mAYLi3bbXDyC1/fBJZPsFRNGTJmamn6Gv KDCp53kgMMNuc37HjoJF5iZLwnQmkm//CONS4CQ8nHqcY6ccUXWoMIUn7BOwtzwg 8ZAYF+Hhtb4LibUTPvssBdqLkWwVGfZPcfOjF8PkeNwK3Sis52fWc7gUDOlvVaMj y4Nwkun8H39DUQmrzndWSG1u67VzAH5nfScvWts4EYT9IkWFN5RU/pGJdA1pQ+MY qL7s+wdHjNvsrjkFUqfXioAuHGDiF6SgO/tU0sebA7/gNIoGmPzhFN2/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvuddgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 20:46:39 -0400 (EDT) Date: Thu, 15 Jun 2023 09:46:33 +0900 From: Michael Paquier To: Nathan Bossart Cc: Jeff Davis , Ted Yu , Pavel Luzanov , Justin Pryzby , pgsql-hackers@postgresql.org Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX Message-ID: References: <20230109225157.GA1288965@nathanxps13> <7d2a8b72e23c8236281c6e00ae790327f965a8e5.camel@j-davis.com> <20230113203334.GA2206335@nathanxps13> <20230113225626.GA2380176@nathanxps13> <20230113231339.GA2422750@nathanxps13> <20230613211246.GA219055@nathanxps13> <20230613235442.GA222795@nathanxps13> <20230614181711.GA488295@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d4entOgqs1SvOSZw" Content-Disposition: inline In-Reply-To: <20230614181711.GA488295@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --d4entOgqs1SvOSZw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 14, 2023 at 11:17:11AM -0700, Nathan Bossart wrote: > On Tue, Jun 13, 2023 at 04:54:42PM -0700, Nathan Bossart wrote: > > On Wed, Jun 14, 2023 at 08:16:15AM +0900, Michael Paquier wrote: > >> So, yes, agreed about the removal of has_partition_ancestor_privs(). > >> I am adding an open item assigned to you and Jeff. > >=20 > > Thanks. I suspect there's more discussion incoming, but I'm hoping to > > close this item one way or another by 16beta2. >=20 > Concretely, I am proposing something like the attached patches. The result after 0001 is applied is that a couple of object_ownercheck() calls that existed before ff9618e are removed from some ACL checks in the REINDEX, CLUSTER and VACUUM paths. Is that OK for shared relations and shouldn't cluster_is_permitted_for_relation() include that? vacuum_is_permitted_for_relation() is consistent on this side. Here are the paths that now differ: cluster_rel get_tables_to_cluster get_tables_to_cluster_partitioned RangeVarCallbackForReindexIndex ReindexMultipleTables 0002 looks OK to retain the skip check for toast relations in the VACUUM case. -- Michael --d4entOgqs1SvOSZw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmSKX2kACgkQnvQgOdby QH0z/w//S74hPBgaA98MigETAege/2dQoimbQ6d6A1/25zW0iJf7Vwl8BQiM+Bhg MD5avBTwWjksayHNzBFgHw01ewX0lMMQGWHbKEO8YIIbmg4XCojtKXj1HrJtXGWp jcyPCHIbKxJScOpxbBNKqsadkFrh2D99I3BLLDc6NYoZwvE0ZvoN9z5eLdGVIFtn nK0O8qpJ3uzxkUVKrGzWfXM7BY1tpiLQpUa1UViUarRiPQhTUtYaRV2HiAjK3coq bjG67gsn25s2AiRK0zxsOzkIi5cDz7qMITvwvDet1g7/7BkFTdggYp7W10zixhRW vGXlUl3qtsMqeM8v+JddwV7hEGi7rVK17i+RO4ibcpU+E4twXH0NTIoGsRcErKVb rRFdnZ8McFm3ewBva5AI5erwO1Aw8v/HO5njXXCnxF4mU+TtsNrHno/7xmNYtnqY xR3VjWUKhwhOT+uyY/bkWoGy4LxVH94LRewEEm0gd53XsGdkpCvJD/jQNJIVCOFx VVQYWxbNC4Y+Z5V5i6j888LXcgfjetrxc8Zc4QbkhhYWxOezLXVnifFNtIkO1SpK qxQV/tDomZJw9aj/PNFhZ5haHOPhvXoSmXGW+QH+F3nVh7XF+rnKpHhRgkUzOVm+ jM7qdX2P5BQWn0beBfMM4nAkXam8W1qMWZfpvvj7/WNOO1Q5z9Q= =Zx73 -----END PGP SIGNATURE----- --d4entOgqs1SvOSZw--