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 1sO2xj-00C4Hg-6t for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Jun 2024 22:23:59 +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 1sO2xg-00DW8D-QO for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Jun 2024 22:23:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sO2xg-00DW84-Gq for pgsql-hackers@lists.postgresql.org; Sun, 30 Jun 2024 22:23:56 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sO2xa-004N50-DY for pgsql-hackers@postgresql.org; Sun, 30 Jun 2024 22:23:56 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-25982aa59efso1263377fac.3 for ; Sun, 30 Jun 2024 15:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1719786228; x=1720391028; darn=postgresql.org; 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=abd05gkTVOF/iGO778VsHkvbQ/WeCXtYGUE2auOoqyM=; b=GeXKX4wYRtP90dxO9RsHgGdNU+huwLNXzomBENavIiVxCd0YMDOf4UQZIP2/LXoqPa gfDRoMZvXhTQ5HrCVpd/up6KOFdX9b3aCvI5o/vpLXLdYai4rzWWf8RCHtWzgraMwRzV Z/6ia/tt9cG6v64yvbqcqhPzciIaDQV0/5LFk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719786228; x=1720391028; 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=abd05gkTVOF/iGO778VsHkvbQ/WeCXtYGUE2auOoqyM=; b=p5JGveBdrSkuMXjg35qO2tPuPIKxZFT72/Idu7U2WgGesu5d0OwPwsbAPB72lFrRvT XWufovMNo5SLktW45m5Dh37JNE7U1bzKJFCAt1OkoZJ3PRyzBfcTpBYWWtPHTMu7N8Zn dGP4oxxCZ+SuH/N1g6X7dYFLCtUFW+mI+hpbyNMFLneAQDl+LN0fks/A0f2wwP4Cu25I amOWDA233m9YSDPfyzmCtY+dPm5hF0Cp7cdLvJwlk5oAh5x5ihTWCJKgpq3LZ0vWUdWT qoS86ttmWzAWGb5JLy9ydpbB+CMP+etxerkpQm/NA1w0uaRuYbgMcxKImHABEadnqZu9 /jxw== X-Forwarded-Encrypted: i=1; AJvYcCXU5KJTNZN5n99mD5aZADv7Sy5wAUdPZDBpMvdHu7st90VAl2k7OnFoj/N9URlEQVfM4GOgL9PDcM5n/vHBpKHNp31IrSF3PoWYfWR3 X-Gm-Message-State: AOJu0YwNwPq769K2trxISKOe7DAVGREHW+I8SzYXKA5UgOEpRKmYt5Lu LBve8ei3Bms31AjA73CfJvZA9aMecAu+D7ow2dRfSX21QAnmAuh+pSsCfEPlUw== X-Google-Smtp-Source: AGHT+IH6DxItx6tm80XalmCliBPin+ZEXnK1A97/+8fZudFMyChoHP+iURG6mgXG62W3eN6mmy9C8g== X-Received: by 2002:a05:6870:ac0d:b0:25d:77ad:dcfb with SMTP id 586e51a60fabf-25db33dd45cmr4486093fac.13.1719786228363; Sun, 30 Jun 2024 15:23:48 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-25d8e33c511sm1460797fac.45.2024.06.30.15.23.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Jun 2024 15:23:48 -0700 (PDT) Date: Sun, 30 Jun 2024 15:23:44 -0700 From: Noah Misch To: Jeff Davis Cc: Nathan Bossart , pgsql-hackers@postgresql.org, Joe Conway , Robert Haas Subject: Re: MAINTAIN privilege -- what do we need to un-revert it? Message-ID: <20240630222344.db.nmisch@google.com> References: <20240214190226.GA373350@nathanxps13> <4d497d82e4516037dc1082d5a62d199ea00d62e7.camel@j-davis.com> <20240223213055.GA1805646@nathanxps13> <196d1c86d43a147e777bb74159774f255dbe73e3.camel@j-davis.com> <20240228165523.GA2435539@nathanxps13> <31ae1bf73e8a1dae3ee7ef2dd43a9bbda1e1ab86.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 04, 2024 at 07:52:05PM -0800, Jeff Davis wrote: > Committed. Commit 2af07e2 wrote: > --- a/src/backend/access/brin/brin.c > +++ b/src/backend/access/brin/brin.c > @@ -1412,6 +1412,8 @@ brin_summarize_range(PG_FUNCTION_ARGS) > SetUserIdAndSecContext(heapRel->rd_rel->relowner, > save_sec_context | SECURITY_RESTRICTED_OPERATION); > save_nestlevel = NewGUCNestLevel(); > + SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET, > + PGC_S_SESSION); I've audited NewGUCNestLevel() calls that didn't get this addition. Among those, these need the addition: - Each in ComputeIndexAttrs() -- they arise when the caller is DefineIndex() - In DefineIndex(), after comment "changed a behavior-affecting GUC" While "not necessary for security", ExecCreateTableAs() should do it for the same reason it calls NewGUCNestLevel().