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 1uSjA0-00CI0t-1n for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jun 2025 21:20:32 +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 1uSj9y-004QhN-4I for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jun 2025 21:20:30 +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 1uSj9x-004QhE-SH for pgsql-bugs@lists.postgresql.org; Fri, 20 Jun 2025 21:20:30 +0000 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uSj9w-0037L3-1p for pgsql-bugs@lists.postgresql.org; Fri, 20 Jun 2025 21:20:29 +0000 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-3de39d642a9so10829635ab.1 for ; Fri, 20 Jun 2025 14:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750454428; x=1751059228; darn=lists.postgresql.org; 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=dHSBXuSmlik2D5lk2JwX+knZv8WzwTvBiYyhz1rr6Yo=; b=aURIemp8GHX6udBi8Bc8Jro1uRPgjT4n7l8h+UByuhsmqSdtaXph11KuMEzctKe5L3 5ftl1pvVae3A9glmus2Mo5rW/eFGLgdJtdOL1ea8VrwF660XhULSR9WBoFon/8l+wBp/ eqGygFCI4bIjgBMDHtt9UJ5LVpD9tOIiRVG4iA+Wp4rxwZc4eYCwUjMsjxtvvWbRhozo 1sloTvgswxiHZdpQz/wH9Z3KpsSMtEfwnBwRKObOYa7dUsAjuldv0T1hdEfxrigIiQiA kq8oHaBzrOmaP6rIuC55YLvBc6CLUXGi1ga9fqmoyaocqHM8wVoNTY+95hgNSz+gxOTU qMRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750454428; x=1751059228; 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=dHSBXuSmlik2D5lk2JwX+knZv8WzwTvBiYyhz1rr6Yo=; b=fmoF4MGHdJO5TlD/j14jNJ93NDsvy4Db1FxFcQcNzaH/EgTxqb9ccTo6s+VCyAxRiO 1JHles6M9PE5Oz4MXsis0SMvPZEP+cHD45NXJbhF8IJrjfE3xkFMgXHYQ//dr9zFYUwZ sbyTn25UdaRw1OaJ8yqTIXtjQeaFcN+Qylvaxr9dUUOI8nFLLnNh3UuuOja/v12G2Qwy r6XW0llJHrf61BW/GUID4gwRer7t3IGmwp2Mn0KAwXz6VMw1d30Gt+QhVLrDaSXN7Tz/ GHuLh7nwEpZvJtcKB5d+hy6Mu7Xct+7wfMah2RzriAJMUXjmGL/LhGg605ku3A0RaM6g WxXg== X-Forwarded-Encrypted: i=1; AJvYcCUIz1WQSNHNm7ig7FGx9iLnA5qBweBp+vMZb0DYgh4v5zyTBtZsi7FEyR5SMNdg9ctI7sQwkwZztDUR@lists.postgresql.org X-Gm-Message-State: AOJu0Yy2lFHvfnOYioiRxTjUNWOFPlhzVfLCV4nCOC6yBAHvhmo1e+4f ACEZH61jEiPkBhPT+5An/vxqQzQTPQr2qNFiTLsyYzTYqoWVci9xI3yG X-Gm-Gg: ASbGncvIt808eo7x3gXPms80Kih46ZwaGAa7L9pFjxbCzoOaE+qWNObQ+i1M6WVK1k3 B97kGNq4HN9r47PGeDOubfDS0EQXsrnBq6fowuNVC6FuUz2CeMzTf09tPFTmJRTEZWQJQahtic2 k8HWpbDm6YbpvNeHv95O4hBEw5wbuQF1Op1Y2RdJ7v+FKNg/x30MYlyshKPIw6Z7nt02WJ/OuGP InJmVZRPkama8ugw6HPPMVGEPx0rfKG7CUf4pFL3uNYLassq7CVyqvA5q6WHwgm2g8AzSUeZn9V gbjF0917M/Wfp7lS1oHG8BuyoEF8ZKlsNYRJWTJ8gyulXAr8w9JWyrDeudHUU7VmXVRNqHvwHqm kRin17Qvk+KQH/tM6L2M5Qx+kUAAQgbr2+CO78kcMVu6LsBXAYHFY X-Google-Smtp-Source: AGHT+IEB9dSQkLEdUOMXOy+oOylgw19N07tP5QUhPLGgx6o8yhSSlMdo1GByyumrHDdg+90rUR8f+A== X-Received: by 2002:a05:6e02:12e8:b0:3dd:b762:ed1d with SMTP id e9e14a558f8ab-3de38caae97mr46277405ab.14.1750454427803; Fri, 20 Jun 2025 14:20:27 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3de37618a28sm9157065ab.11.2025.06.20.14.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jun 2025 14:20:27 -0700 (PDT) Date: Fri, 20 Jun 2025 16:20:25 -0500 From: Nathan Bossart To: Tom Lane Cc: mert@futo.org, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist Message-ID: References: <18964-ba09dea8c98fccd6@postgresql.org> <2474668.1750451081@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2474668.1750451081@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jun 20, 2025 at 04:24:41PM -0400, Tom Lane wrote: > In the case at hand, where the prefix is known but the parameter > isn't, I think we could safely assume that the setting is either > a mistake (probably installed while the extension wasn't loaded) > or the described case of a parameter the extension no longer > uses. Either way it seems safe to allow RESET with suitable > privileges on the target DB and/or role. I'm a little hesitant to consider opening this up too much. For example, what if someone accidentally downgrades the library temporarily and a GUC definition disappears, or one version of the library removes a parameter and a future one adds it back (due to user backlash)? Maybe those situations are too contrived/unlikely to worry about, though. > If the prefix is not known, then we're really flying blind. > It looks like we assume the parameter might be SUSET and therefore > allow both ALTER DB/ROLE SET and RESET only to superusers. > I'm hesitant to relax that case. IIUC we also check pg_parameter_acl in this case, but I agree that we don't want to relax this any further. -- nathan