pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: mert@futo.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist
Date: Fri, 20 Jun 2025 16:20:25 -0500
Message-ID: <aFXQmZ2sveFAwdjY@nathan> (raw)
In-Reply-To: <2474668.1750451081@sss.pgh.pa.us>
References: <18964-ba09dea8c98fccd6@postgresql.org>
	<aFW8R6Qlgtbp7TOk@nathan>
	<2474668.1750451081@sss.pgh.pa.us>

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





view thread (14+ messages)  latest in thread

Message-ID: <aFXQmZ2sveFAwdjY@nathan>
Permalink:  ../aFXQmZ2sveFAwdjY@nathan/
Also on:    postgresql.org/message-id/aFXQmZ2sveFAwdjY@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, mert@futo.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist
  In-Reply-To: <aFXQmZ2sveFAwdjY@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox