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 1q9BP2-0002YF-KJ for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 21:18:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9BP0-0001v4-Ee for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 21:18:10 +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 1q9BP0-0001uv-7w for pgsql-committers@lists.postgresql.org; Tue, 13 Jun 2023 21:18:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9BOw-002CZ6-J9; Tue, 13 Jun 2023 21:18:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 35DLI1WY1805938; Tue, 13 Jun 2023 17:18:01 -0400 From: Tom Lane To: Jeff Davis cc: "David G. Johnston" , Noah Misch , Jeff Davis , "pgsql-committers@lists.postgresql.org" , Laurenz Albe Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. In-reply-to: References: <89a415b86d5421941e4281ba5bf6288934078624.camel@j-davis.com> <573014.1686375211@sss.pgh.pa.us> <20230612170510.GA201972@gust.leadboat.com> <32747058519a68f099ac175a3a4bde4ba7cebb22.camel@j-davis.com> Comments: In-reply-to Jeff Davis message dated "Tue, 13 Jun 2023 13:55:13 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1805936.1686691081.1@sss.pgh.pa.us> Date: Tue, 13 Jun 2023 17:18:01 -0400 Message-ID: <1805937.1686691081@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > The most objection seems to be expressed most succinctly in this > message: > https://www.postgresql.org/message-id/16134.1456767564%40sss.pgh.pa.us > "if we allow non-owners to run ANALYZE, they'd be able to mess things > up by setting the stats target either much lower or much higher than > the table owner expected" > I have trouble seeing much of a problem here if there is an explicit > MAINTAIN privilege. If you grant someone MAINTAIN to someone, it's not > surprising that you need to coordinate maintenance-related settings > with that user; and if you don't, then it's not surprising that the > statistics could get messed up. I agree that granting MAINTAIN implies that you trust the grantee not to mess up your stats. > Perhaps the objections in that thread were because the proposal > involved inferring the privilege to ANALYZE from other privileges, > rather than having an explicit MAINTAIN privilege? Exactly. regards, tom lane