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 1q99lF-0006sz-1d for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 19:33:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q99lD-0000tO-UJ for pgsql-committers@arkaria.postgresql.org; Tue, 13 Jun 2023 19:32:59 +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 1q99lD-0000tE-KY for pgsql-committers@lists.postgresql.org; Tue, 13 Jun 2023 19:32:59 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q99lA-0021Yj-S0 for pgsql-committers@lists.postgresql.org; Tue, 13 Jun 2023 19:32:58 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6537d2a8c20so4750034b3a.2 for ; Tue, 13 Jun 2023 12:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1686684776; x=1689276776; 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=aqnj7zrQjTYsaV7o7BY8BO2nkweIqVYqiWNXmo1yO/o=; b=nyhMjIEqvxQwhxC6Q4WOhjQLInGpw8arVEn5EHpF6y/XySGaVh9DLmhd3z6rduLWBX zeMPOSDAshphnpNys/hLc3EUxESwvsGNlu/dgKGRuDOlhejCcH2upoLNjGe+AhNFLbdf 13Nw96EnzOkMtYOZlWxfdN5xxbbQrYUDRwwbiY1xGo+jWrjqiHEEqw1kSIw+JEWRrFwr D5sXlkb6YQPMfpNC5TOhoRk4PdPQj6SjA2qSxTif+tKt3nn8QtMDU+7azOUMaVopOCV5 E3HmYIPA4qlY2EdUuIBq0TbU7JYNbXsBGMxM2TIX1MPNQQS25fZRBkRPNmdDNUVfK/Lj kzwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686684776; x=1689276776; 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=aqnj7zrQjTYsaV7o7BY8BO2nkweIqVYqiWNXmo1yO/o=; b=fFum7SxQU549bE4MDG56aQJcR+Wn3j0aFpqnqHHlTpc28kmhsU3c+MUnhEcl+BUZD6 EQZLqCZqK8iHk6yvIokHVjgQb663Vpac2m11EQ41f4HUQACuvXHZaxj3n6tv3F4XAy2w jbMu7E8Mz79c/m+7a3JcRACBCrCwgx8CGwbt9XP/3lpgr7/GrIjZltLgnMxTNUiCKHHj Y59Q/Zqg1+sVKqIa0bEvM7FECOdwRvglYBj374xSqm2r11oM/Hk6BsMmlMa7ttC8IivO ITomvGzWaUgH3EqRIPZyEAhmuz5TmGMYeh6PNxQa+hFo4ga6X/aRZcGAHad6zGN5bnRe jl5g== X-Gm-Message-State: AC+VfDxwqALP+QuMNmKBBvDfeoyixxCzf9GVnHCPO07/beWbrGzu3zkH ne4qMmiFZfC0cSx2yNiDyyd8uw== X-Google-Smtp-Source: ACHHUZ7FXtAIdcGgNUlWjH70ZmcYrpm2zGOqIo0rX/Ti0HL1g5dJd5yfL5jRiG/iZCP5/sFQ5D7apA== X-Received: by 2002:a05:6a21:7899:b0:117:b923:5106 with SMTP id bf25-20020a056a21789900b00117b9235106mr15121936pzc.43.1686684775869; Tue, 13 Jun 2023 12:32:55 -0700 (PDT) Received: from [172.24.1.9] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id 21-20020aa79215000000b0064559b58eb8sm8963913pfo.154.2023.06.13.12.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 12:32:55 -0700 (PDT) Message-ID: <11b1f70d9ffbc5ea0c4e8eed7ab7b3b7e3900c3a.camel@j-davis.com> 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 Date: Tue, 13 Jun 2023 12:32:54 -0700 In-Reply-To: References: <89a415b86d5421941e4281ba5bf6288934078624.camel@j-davis.com> <573014.1686375211@sss.pgh.pa.us> <20230612170510.GA201972@gust.leadboat.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 Mon, 2023-06-12 at 17:50 -0700, David G. Johnston wrote: > Only change the search_path if someone other than the table owner or > superuser is running the command (which should only be possible via > the new MAINTAIN privilege)? That sounds like a reasonable compromise, but a bit messy. If we do it this way, is there hope to clean things up a bit in the future? These special cases are quite difficult to document in a comprehensible way. If others like this approach I'm fine with it. Regards, Jeff Davis