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 1qHJqk-0000JT-9n for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jul 2023 07:56:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qHJpk-0007yd-FY for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jul 2023 07:55:24 +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 1qHJpk-0007yU-3V for pgsql-hackers@lists.postgresql.org; Thu, 06 Jul 2023 07:55:24 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qHJpd-002Jhv-78 for pgsql-hackers@postgresql.org; Thu, 06 Jul 2023 07:55:22 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5634808e16eso291637eaf.2 for ; Thu, 06 Jul 2023 00:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1688630116; x=1691222116; 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=xBNZtOQDuSG5Kusmtn8f+bcG22XnJXygPFs1zqFBFE8=; b=D8EWe31K3yVK0Jhm2viDOCkR4GpLQa44v5i/8lXuVCc6SSX2hd2kDkZJ+mIZVgTgmu DjSoJr0kX8hyvnCgDYtUrBY8WtTvBaBjv5RGL6k/1NmmoFhbUynWEKGIXf/SpOIJxU+f Q0JEKyPKLnZGbwWia6ciy/aGZ77EdeuI0cspITGvpryZGn8uEZtUTGwKOPqnAjGVlLS3 fj3ixSO5zHRhlzUXoxIxgu8JjjhocqEVR/wJVnvrwyhjD8rLFMwghiVA70iRFbtsMC3L g9zw6KisPU6k6a+LOJLoYmBfz7oOBsSTuEwdI8zSGsCyCqqoakXszy00R6a2KmIUjzHg f0qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688630116; x=1691222116; 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=xBNZtOQDuSG5Kusmtn8f+bcG22XnJXygPFs1zqFBFE8=; b=c42U8IC2TY/IQ8CG7FO4Re48wXV4Uv3ipgEGk6Fx6zvHuUB9Rfmx/TF74VM9WoQnq6 UGGWHLz4I1eIrmvPKEMtSGUXbN+uoWKXdBcPO+Z+VyLJEPf8bfN4BSAvQgDX1BYzmvHN gC68SOnlEi0+X7Q17hLUqsad6qjuydNEiu2NCk04PDd+Ur+hXMECgshb9CkiZJAcbfLM 11GFKJ1J2D3Da5fr2pu5taVSkNxGryFISoDo5NeKMS6CZyg/92CI/bF8BeiR+OBafG7j 9ZoyIRRv+iB0UYrEumGnr04EzJ/UKEGfNZMgMhGS+x0usxc0TUe9SVsaBq0d4xZn+6d6 1IFg== X-Gm-Message-State: ABy/qLY5j2PPOuTdXKQ+wLIl5qpMLFc1DxLBg2NFHXDpTTvXSASWbsxz mYrW1Ggk891p4BDxmfOUHRVzlg== X-Google-Smtp-Source: APBJJlHF6XvGac0IiyH212WsIIuLytYymATihEZl0YWULoIO/44Lof7dvwn45W/eNcg44LigJObjmQ== X-Received: by 2002:a05:6808:1508:b0:39e:ae2e:60e2 with SMTP id u8-20020a056808150800b0039eae2e60e2mr1877272oiw.32.1688630116602; Thu, 06 Jul 2023 00:55:16 -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 i20-20020aa787d4000000b00678afd4824asm718262pfo.175.2023.07.06.00.55.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 00:55:16 -0700 (PDT) Message-ID: <931c23465c331fc3d53073cdefa53bad464b0469.camel@j-davis.com> Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. From: Jeff Davis To: Nathan Bossart , Tom Lane Cc: Robert Haas , Noah Misch , "pgsql-hackers@postgresql.org" Date: Thu, 06 Jul 2023 00:55:14 -0700 In-Reply-To: <20230630050921.GA2640352@nathanxps13> References: <20230612170510.GA201972@gust.leadboat.com> <20230613182920.GA259321@gust.leadboat.com> <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> 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-06-29 at 22:09 -0700, Nathan Bossart wrote: > On Thu, Jun 29, 2023 at 08:53:56PM -0400, Tom Lane wrote: > > I'm leaning to Robert's thought that we need to revert this for > > now, > > and think harder about how to make it work cleanly and safely. >=20 > Since it sounds like this is headed towards a revert, here's a patch > for > removing MAINTAIN and pg_maintain. It was difficult to review standalone, so I tried a quick version myself and ended up with very similar results. The only substantial difference was that I put back: + if (!vacuum_is_relation_owner(relid, classForm, options)) + continue; in get_all_vacuum_rels() whereas your patch left it out -- double-check that we're doing the right thing there. Also remember to bump the catversion. Other than that, it looks good to me. Regards, Jeff Davis