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 1qBkEh-0001t7-Fr for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jun 2023 22:54:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qBkEg-0001Uj-FV for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jun 2023 22:54:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBkEf-0001UZ-JG for pgsql-hackers@lists.postgresql.org; Tue, 20 Jun 2023 22:54:06 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qBkEc-003hqP-9I for pgsql-hackers@postgresql.org; Tue, 20 Jun 2023 22:54:04 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1C41732008FD; Tue, 20 Jun 2023 18:54:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 20 Jun 2023 18:54:00 -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=1687301639; x=1687388039; bh=9+ puXdQx9nwCRKO1XQ+PbL8do4bzs2EFycbZKCv0dU8=; b=J5ePuO6jTP3Gg6iVw5 xJNmkp6teIllcb7v3zpENBTFmo9K9D+vWSvEt4O1HUtjO1SWonAI5uImQR+xqOoB 9TCPVZbtSK+bIJyNdDqliUbOWkeoMGMChPkiJS4ITqDVJEB4bDH7oNPWBBvsVrBa XEM4fUx650SJmrA11dbLWWJDFPR5IC/446oYPLWq0ieyw4Nuexcb8m3ntBBujlEa zlry3Hm6xw4XfSDibpvf5/gAB9z/sZAeEzSzGMAmNjptweOisbHpSLOP88Le3RDR RubNbi9tCWLeJ5TU1Tfd5CHHPUvn/3TEZvi3fwMu2JkIPexe+LD37EYAgzUxxOmi 28og== 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=1687301639; x=1687388039; bh=9+puXdQx9nwCR KO1XQ+PbL8do4bzs2EFycbZKCv0dU8=; b=YkWicxkEgVKmJlCZRU6KaBWqZtmok Rjy5ziWMrHsKZrPjSErSbsDluKXS4LiAQ0svMr/7ms5SZ43Sw27mNJI5WG3707V/ n7lQmk2eOxSOxi7dKtbVBnhiE/WQ+s4ovXQKq1zMN7b8gRYKPzFMd1utaQdE4vJA Jr1JFSIO4jtlZ+mrWyTMFgQ1ZhHRj5B2LSnSfkwjIVzMNUCXbl4REN4r0FjiyHWl cjpBIuf9vfoqf5yFI1I9Inx8FU/Sici70bRcHIapHJXuXbBWVCYByBLT1S6YksNW Urj0pJZPelcIJ+lpMvdfIoWOkxKhcwEUafrDa/lbjOJvigYw+hZCZ/Wsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefiedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jun 2023 18:53:56 -0400 (EDT) Date: Wed, 21 Jun 2023 07:53:52 +0900 From: Michael Paquier To: Jeff Davis Cc: Nathan Bossart , Ted Yu , Pavel Luzanov , Justin Pryzby , pgsql-hackers@postgresql.org Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX Message-ID: References: <20230613211246.GA219055@nathanxps13> <20230613235442.GA222795@nathanxps13> <20230614181711.GA488295@nathanxps13> <20230615041044.GA736001@nathanxps13> <20230615235700.GA877311@nathanxps13> <20230616052025.GA1026700@nathanxps13> <20230619215534.GA442477@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sfUi7aVHR8Ps530D" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --sfUi7aVHR8Ps530D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 20, 2023 at 11:43:05AM -0700, Jeff Davis wrote: > The only behavior I'm worried about is REINDEX. I'm not sure what we > should do about it, or if we even want to do something about it. If we > want REINDEX to fail in this case, we should be sure to check > permissions on everything up-front to avoid doing a lot of work. Yes, that feels a bit inconsistent to only check the partitioned table in RangeVarCallbackForReindexIndex() and let all the partitions process as a user may not have the permissions to work on the partitions themselves. We'd need something close to expand_vacuum_rel() for this work. I am not sure that this level of change is required, TBH, still it could be discussed for v17~. > The > only other option I can think of is to REINDEX only those indexes > declared on the partitioned table (not the individual partitions), > which seems consistent but might be confusing to users. I am not sure to understand this last sentence. REINDEX on a partitioned table builds a list of the indexes to work on in the first transaction processing the command in ReindexPartitions(), and there is no need to process partitioned indexes as these have no storage, so your suggestion is a no-op? -- Michael --sfUi7aVHR8Ps530D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmSSLgAACgkQnvQgOdby QH3Q0w/8CDawj/x7paxoH5D1K795+H4o8bRuHLM64upMiYD1hvk3aLS/8Ne3LHdc f1Yc3Tyx6TFUsesDCfp1RkYECbvkeHi/e2v9tL+a/jU0Wno38jrWaepMYXcdnRGe +ljSWojkg1V95KJoA3Vy60j7MOGxlK1x/rA1wq/KbCvoa0DS5TW8++j4k4JYjzxG I8/6pT6lMy5P/K+67dQX7FATPyF/fPUzslGRGLF1Yg5MGUcRQfBYv4uaoCcTmwBD DlqByRdE+FTIrJzU0i4s8WD1YBWgZYhyP1uya/wAwTQf84ubs6Ao3s74xr8Gnmo3 jTvs2Q9uX3QSrIe8Rx/mOUACpkkQz8sLOikYXIPNi+9eEwaIncCuUm9gtYclkq/1 9jdpIXZK39Qn5L3bgIrDA3G7TRxiU1vDe40QMIPL+0KrdFssExeBnvNTFZUHcLq1 joBJpR+b55Dcv90ViGG+1PLJcWbVXlPwmT1C8MNmCTQ+M7dAWXLRwySAaEilYluR gPlyxWEYGvMcEh9r9fba3dQAFszWwvX4yEEfJgvPccf5dO/sARfNZrn4k0s3xgJi nrJYcthH5WzYqTEqGuuhGEgGqDouKeFLxIiqH2ue21yAFVXBl6TCOvzdRMNR1sVT a0s9mZlC3fFC2GzIt4idyLtJo1gDoP+whZgrbmjzAd0RQzN0U2g= =Rdo5 -----END PGP SIGNATURE----- --sfUi7aVHR8Ps530D--