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 1qGO92-0000NL-AG for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jul 2023 18:19:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qGO90-0007ua-2I for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jul 2023 18:19:26 +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 1qGO8z-0007uR-PM for pgsql-hackers@lists.postgresql.org; Mon, 03 Jul 2023 18:19:25 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qGO8t-00200g-1n for pgsql-hackers@postgresql.org; Mon, 03 Jul 2023 18:19:24 +0000 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-55bc22375b9so24611a12.2 for ; Mon, 03 Jul 2023 11:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688408357; x=1691000357; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LvXivMXJC89TEZ08iNtVNcmd9cMvWA818rSgdadGH8Q=; b=TLnaPVe/fId58YVXldw23+F89lvmyBHcXh+BHO+WXye+lOuKb2t/sypRcA1IQfPeqs 4oWPTe+C0VU9fBb0LvGq0Vh3vwlkRTD9UBCERPcWY/rCBU0Qk+U7V1AaNTgOmOTH6qbV 0Wfx3GWrK3AVPYgM2v9k4FHtK8xVKVVpfTxYHDBVlpXalOJkYilic9KrNAlcdFGRfwhp X6bUS+cBkFAirsrlzulci9cszJBopLVAbArTrlrKbF5KD2VkL398a0nWeSjeb/xRMFFF XFE3lxcs6nPSbE5eRokxjaW4PD+K/uahT9vd9pvOTsRuK6iikK139LB06A15P9pe5mA4 zo6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688408357; x=1691000357; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LvXivMXJC89TEZ08iNtVNcmd9cMvWA818rSgdadGH8Q=; b=YOqkBL/2VRhl+tu9g+0YudszJIWwLcCuUkAe0Vi5Vd5UwD5TGR33hs4n0GY7PaZ9DO qJj1Cn4SY7VNGg1nX8U+BTmxKunOhiVpvnkxRZchRobyd6NpxpqFRm8KhxF4oNdFxwZf qEVxoLXdjQfTYBxA4Wg0LZDAZY2qRM31tPBu9QO/5PdozfrfU/KhrGxPVousWWjA2UHy hdFlY7H9H+FBbvaYf/XPb0MWYGcFPSZXTN9tFbfINy9yAbKamsnolIvghbxapS6UVsSI 7J8tWjNGJwrPAQuYveZqmPqTvFwsIdA9GE8FqLcNyJ1OoPEs0+SdwqCTHDeBV+BPISSo guZA== X-Gm-Message-State: ABy/qLY1KEYDSQcjVwoteuLzhts/I8rC377sNlU6MAYntPeHgLBxNNCd dn8x99oR9Eg+7k4BYaCjNj8= X-Google-Smtp-Source: APBJJlEaUh6pD7FJl8WRXeIQyopFUI1xRE5WaKWXXNcBK2EWBWzsDGd48jtaFs+ShHXpvMK48IHk4Q== X-Received: by 2002:a05:6a20:9384:b0:12e:adbd:797a with SMTP id x4-20020a056a20938400b0012eadbd797amr2704070pzh.62.1688408356735; Mon, 03 Jul 2023 11:19:16 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id x48-20020a056a000bf000b0062cf75a9e6bsm3275608pfu.131.2023.07.03.11.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:19:16 -0700 (PDT) Date: Mon, 3 Jul 2023 11:19:14 -0700 From: Nathan Bossart To: Noah Misch Cc: Tom Lane , Jeff Davis , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. Message-ID: <20230703181914.GA2944898@nathanxps13> References: <1799839.1686687804@sss.pgh.pa.us> <4df537f5a0d8c0ceac3eec3809d1144880b8e76d.camel@j-davis.com> <578fb4be80247570e6a05924908765a0b345971e.camel@j-davis.com> <43bbc9f7318057f51552d5986830908cb018dadf.camel@j-davis.com> <1659699.1688086436@sss.pgh.pa.us> <20230630050921.GA2640352@nathanxps13> <20230630183546.GB2828237@nathanxps13> <20230703035731.GA3028728@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230703035731.GA3028728@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Jul 02, 2023 at 08:57:31PM -0700, Noah Misch wrote: > Another dimension of compromise could be to make MAINTAIN affect fewer > commands in v16. Un-revert the part of commit 05e1737 affecting just the > commands it still affects. For example, limit MAINTAIN and the 05e1737 > behavior change to VACUUM, ANALYZE, and REINDEX. Don't worry about VACUUM or > ANALYZE failing under commit 05e1737, since they would have been failing under > autovacuum since 2018. A problem index expression breaks both autoanalyze and > REINDEX, hence the inclusion of REINDEX. The already-failing argument doesn't > apply to CLUSTER or REFRESH MATERIALIZED VIEW, so those commands could join > MAINTAIN in v17. I'm open to compromise if others are, but I'm skeptical that folks will be okay with too much fancy footwork this late in the game. Anyway, IMO your argument could extend to CLUSTER and REFRESH, too. If we're willing to change behavior under the assumption that autovacuum would've been failing since 2018, then why wouldn't we be willing to change it everywhere? I suppose someone could have been manually vacuuming with a special search_path for 5 years to avoid needing to schema-qualify their index expressions (and would then be surprised that CLUSTER/REFRESH no longer work), but limiting MAINTAIN to VACUUM, etc. would still break their use-case, right? > From my reading of the objections, I think they're saying that commit 05e1737 > arrived too late and that MAINTAIN is unacceptable without commit 05e1737. I > think you'd conform to all objections by pushing the revert to v16 and pushing > a roll-forward of commit 05e1737 to master. Okay, I'll adjust my plans accordingly. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com