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 1q9B2u-0001bS-KN for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 20:55:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9B2t-0003us-Ha for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 20:55:19 +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 1q9B2t-0003uj-61 for pgsql-committers@lists.postgresql.org; Tue, 13 Jun 2023 20:55:19 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q9B2q-00229m-7A for pgsql-committers@lists.postgresql.org; Tue, 13 Jun 2023 20:55:17 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1b3a9e5bf6aso23018155ad.3 for ; Tue, 13 Jun 2023 13:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1686689715; x=1689281715; 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=IgM2fwbC7ntCXvvhSQlzm26OSCwL3o4slpoCE7/nURM=; b=u6Dj570irJlHP/9o0t3zFCj2ttKXsw4l+QOvR7m0jyRW7cs3CVCSOckKMYxJ319iSb ZQg4yIwGmnRyvpVQhZq/Aj3/nedQnbxyFnEmvhCVnTuW0vSGU0UeVwqrW33AjEvaZiYo HVtORkXxm4HujC9+GqJ0Vqsu3OTTqdX+7iQIrlYnfXV39Pz17j3XntLu28K3NTdES2eT 3NkORwwuc3VDStkFrXYqiUPstMSs+afcjFKRWM3nteN+j5FVNQ02OV3GVIw0GcKOOqw5 qkam3sT2ovuwpisziqA95chKJLn8yNJmJtyoRjy09mh33W25pMxMSBHk4UcxYXAhIdv0 RhFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686689715; x=1689281715; 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=IgM2fwbC7ntCXvvhSQlzm26OSCwL3o4slpoCE7/nURM=; b=csVNrI42K82c4Nb7qaFoEVMSgemN0+mtE6S8m/22Xvl1DonaA0Y1oqO0HU7L2MdMjC MtGJN1oHyL9Mvjf1Nn1QWPmjcbWwW2UO0FhMIH6YJ9Ux867+wPGUl1rLsdDiXopom4hr 81MArr+3hOaf9Dxs8XgyY+2PW+pIrFhPwiuITP60iSo8g4r5FIjC/4/dRc2QfHs3NBaI PghGbHCUv9iF60qZWUfYppUc9y5mIqTkJsG6MTsPy+DAA+FSqRMYwn5HozH4k43nxJH6 eGUPPqvbVOU5f3bdBsZPGrEpAyKHOVA6feaTu6bpMDiBKtt0zjxezuXFD9LUAwm23Ssw MRMg== X-Gm-Message-State: AC+VfDz2raJIRizgRhm2cF745pq01lE0P5JIOAhsrM5B33C+60pyb7mn 6hS+DdiqO/w/r+zX5+wKa+h+Dw== X-Google-Smtp-Source: ACHHUZ5hxem3GZBnjYJPniudJhToICGL0AVihOfyID5GHlrHDHRdTATq/ocdYtnB8UttcnW3Bim67w== X-Received: by 2002:a17:902:d482:b0:1b0:25ab:a9ec with SMTP id c2-20020a170902d48200b001b025aba9ecmr10920544plg.42.1686689715073; Tue, 13 Jun 2023 13:55:15 -0700 (PDT) Received: from [172.24.1.9] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id y13-20020a17090322cd00b001a69dfd918dsm10701241plg.187.2023.06.13.13.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 13:55:14 -0700 (PDT) Message-ID: Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. From: Jeff Davis To: "David G. Johnston" Cc: Noah Misch , Tom Lane , Jeff Davis , "pgsql-committers@lists.postgresql.org" , Laurenz Albe Date: Tue, 13 Jun 2023 13:55:13 -0700 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> 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 Tue, 2023-06-13 at 13:22 -0700, David G. Johnston wrote: > This is the specific (first?) message I am recalling. >=20 > https://www.postgresql.org/message-id/A737B7A37273E048B164557ADEF4A58B538= 03F5A%40ntex2010i.host.magwien.gv.at 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. 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? Regards, Jeff Davis