Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNDF5-004Loa-BP for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jul 2023 14:05:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qNDE4-00Evyl-0X for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jul 2023 14:04:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNDE3-00Evyc-Ev for pgsql-hackers@lists.postgresql.org; Sat, 22 Jul 2023 14:04:51 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qNDDv-000rro-Tw for pgsql-hackers@postgresql.org; Sat, 22 Jul 2023 14:04:49 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5838881e30bso26334977b3.2 for ; Sat, 22 Jul 2023 07:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1690034683; x=1690639483; h=user-agent: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=jTnE9SG3CivisvZzyjA2LW232eUFNcw8hb020Fz9C+0=; b=bC+YkU0jIfGc1/T4MmOqU26BfrkKhcfLbVE8Kll2OtHlgdYZStmP4ZKRMGP730bMMN W4+MzJB+zUsxa4b6P5dCGnWs3A/P+zh45CvDrkm5/M/rlkgoOVlFjgCtp5Mc4k3SSLGK doAQsQUV+DezJ46HMFe6BZx7Zlci4c0ZYCOWs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690034683; x=1690639483; h=user-agent: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=jTnE9SG3CivisvZzyjA2LW232eUFNcw8hb020Fz9C+0=; b=G1NSIE+uuFD2zhy8ScuJWGKdgvCYKzl3YY3ItBnmmVP9p/I1NWnE632uVACXvOqJoh nBUR0++/zgtvWwYTr3Q2TGnJXJLji3dw5SqVIYzNBl0O2dN1XnOE8tee0+m+HRy5OL9Z ui4iUgMMztX9wJ4mQf6Dn3tNIViKXPJO/cdlD06EUjT2sW361+l5XOv5OEG74SN0jfss DDwVrsLKRVLESfYUxECG93K3EhBLWVX8W27h803mAI2gL7Ayrov/RGlsPutQjPhHENGF rmXKiXSiFiHlKAHv77bnb0Ln/T631UTaeJo0Ed3iL2eI9VR+3AGqCHsH6e2ThGq8ezuw lWdw== X-Gm-Message-State: ABy/qLacmwqfYfi8RL+Vx4fG1xkzIq/4FNz65v1YOFVCKyqKCZUg9hpo Y8Vhk9cIQdDNKF6WNp769TZ1Ag== X-Google-Smtp-Source: APBJJlG2haYjFJrtfFDfg6dQFCsl87B5WWnxlu1GVSPvcJNc1yu6mBMizfKLLCqQGwopvtWY+jj8fQ== X-Received: by 2002:a25:7ac6:0:b0:c5e:d3af:35cb with SMTP id v189-20020a257ac6000000b00c5ed3af35cbmr3797565ybc.42.1690034682846; Sat, 22 Jul 2023 07:04:42 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id j14-20020a25d20e000000b00ce264e7685bsm1377966ybg.37.2023.07.22.07.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jul 2023 07:04:41 -0700 (PDT) Date: Sat, 22 Jul 2023 07:04:38 -0700 From: Noah Misch To: Jeff Davis Cc: Nathan Bossart , "David G. Johnston" , Gurjeet Singh , pgsql-hackers@postgresql.org, Robert Haas , Greg Stark , Tom Lane Subject: Re: Fix search_path for all maintenance commands Message-ID: <20230722140438.GA50610@rfd.leadboat.com> References: <2cf41c8edeaaf7acb757095e6eceab8ae926f3da.camel@j-davis.com> <20230715211333.GB3675150@rfd.leadboat.com> <20230717175813.GA717781@nathanxps13> <2ad1dd4e5be5567c0d75676b348eab33b529e974.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 21, 2023 at 03:32:43PM -0700, Jeff Davis wrote: > Why do we switch to the table owner and use > SECURITY_RESTRICTED_OPERATION in DefineIndex(), when we will switch in > index_build (etc.) anyway? Commit a117ceb added that, and it added some test cases that behaved differently without that. > Similarly, why do we switch in vacuum_rel(), > when it doesn't matter for lazy vacuum and we will switch in > cluster_rel() and do_analyze_rel() anyway? It conforms to the "as soon as possible after locking the relation" coding rule that commit a117ceb wrote into miscinit.c. That provides future proofing.