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 1qK4fD-00071C-49 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jul 2023 22:19:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qK4fA-00059v-6k for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jul 2023 22:19:52 +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 1qK4f9-00059m-Ol for pgsql-hackers@lists.postgresql.org; Thu, 13 Jul 2023 22:19:51 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qK4f4-000J7V-Kb for pgsql-hackers@postgresql.org; Thu, 13 Jul 2023 22:19:50 +0000 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3459baa237bso5444275ab.3 for ; Thu, 13 Jul 2023 15:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1689286785; x=1691878785; 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=2H2CBnDGBNJjNlv6cCv0r23tNYRPv5EqOaP9jwOL3JA=; b=Z09fkwVTXdS3r95s+Zzmxi40LIatZeBt4J/GSnDr474mnDuHmaQc5v4A6IQ98X6vm9 pjQK725jSTCzf5/MY35BZewHZaX4lVFMbWv9KrRRelnDn34oBr/ZmrFXSdtn3IxJ5zw/ 7EEWaXZtj76i/fUTD8IdCfPUl3y/MD43ztPehSwsxB72UtYIrRW10t0EHkGlci7L9P2B 66CmVGmyFeUiMx1V2tOUD7TTBU4idAtefphmUYY20M4YlFHwBbccXxTJbbHhKlYjIuRp vqfSfiytdJexn24onBDogOXt+VAiwWq6IzHRo7xSZfyb4ITrjbJWZEPktVCZV/MlaEux TMrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689286785; x=1691878785; 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=2H2CBnDGBNJjNlv6cCv0r23tNYRPv5EqOaP9jwOL3JA=; b=g0T/RKjyjaECNP6hCV681HDkFxjD9U8Fxu2SDA0DQzrzEkAdKoORwM/NBc0HCetCqc R583WhVT+Ml5XUquebs7L2d9y0eLHvFSFtyYxmLtwfOJL5pYxlaG+rDtD3aj5ZqW75ma 2qQ8b1gTls0UYrfkIwu91Kl/mHKw7G2Ik4MEtGZqeNFGXeS7cS6U5xveZppRiMOUCXje xDx7eibxtxIclXkxoYQqzqcwGtJ20RIxL83DH1BUmE63BwMvUPiNIIuUejeRz5Zn1I4+ jl3lc49jzf+cwD7fTaOCjMyG6nkUkC8kKb68QzYEuMgeuJE1OW2Y5FN9+RDK08kog2Sm 4m0g== X-Gm-Message-State: ABy/qLbmDFtstY9EeGHKxg9jG+0nW/g+073BvLR8AaHfpZW4xj02aoM1 YEooJ8dljV7HBXje/BQnLw9B1w== X-Google-Smtp-Source: APBJJlHJ4HLpF9AVwRjUr2xs1722/Csz/7xHpqrmwIZuD3kp4ScTfbIX2fXtMXCX8BhKSa7ne9w2Bw== X-Received: by 2002:a92:de46:0:b0:346:5e1c:f01e with SMTP id e6-20020a92de46000000b003465e1cf01emr2880645ilr.5.1689286784995; Thu, 13 Jul 2023 15:19:44 -0700 (PDT) Received: from jeff-laptop.lan (c-73-170-46-202.hsd1.ca.comcast.net. [73.170.46.202]) by smtp.gmail.com with ESMTPSA id c11-20020a17090a674b00b00256353eb8f2sm35407pjm.5.2023.07.13.15.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 15:19:44 -0700 (PDT) Message-ID: Subject: Re: Fix search_path for all maintenance commands From: Jeff Davis To: "David G. Johnston" , Gurjeet Singh Cc: pgsql-hackers@postgresql.org, Nathan Bossart , Robert Haas , Noah Misch , Greg Stark , Tom Lane Date: Thu, 13 Jul 2023 15:19:42 -0700 In-Reply-To: References: <2cf41c8edeaaf7acb757095e6eceab8ae926f3da.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 Thu, 2023-07-13 at 13:37 -0700, David G. Johnston wrote: > If this is limited to MAINT, which I'm in support of, there is no > need for an "escape hatch".=C2=A0 A prerequisite for leveraging the new > feature is that you fix the code so it conforms to the new way of > doing things. The current patch is not limited to exercise of the MAINTAIN privilege. > Tom's opinion was a general dislike for differing behavior in > different situations.=C2=A0 I dislike it too, on purist grounds, but woul= d > rather do this than not make any forward progress because we made a > poor decision in the past. I believe the opinion you're referring to is here: https://www.postgresql.org/message-id/1659699.1688086436@sss.pgh.pa.us Which was a reaction to another version of my patch which implemented your idea to limit the changes to the MAINTAIN privilege. I agree with you that we should be practical here. The end goal is to move users away from using functions that both (a) implicitly depend on the search_path; and (b) are called implicitly as a side-effect of accessing a table. Whatever is the fastest and smoothest way to get there is fine with me. > And I'm against simply breaking the past without any recourse as what > we did for pg_dump/pg_restore still bothers me. Is a GUC the solution here? Gurjeet called it heavy-handed, and I see the point that carrying such a GUC forever would be unpleasant. But if it reduces the risk of breakage (or at least offers an escape hatch) then it may be wise, and hopefully we can remove it later. Regards, Jeff Davis