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 1uUSdb-003dNK-B2 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Jun 2025 16:06:15 +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 1uUSdY-005KYA-Tc for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Jun 2025 16:06:13 +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 1uUSdY-005KY1-GL for pgsql-bugs@lists.postgresql.org; Wed, 25 Jun 2025 16:06:13 +0000 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uUSdU-003xFI-0A for pgsql-bugs@lists.postgresql.org; Wed, 25 Jun 2025 16:06:12 +0000 Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-3df2f97258eso203365ab.0 for ; Wed, 25 Jun 2025 09:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750867567; x=1751472367; 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=njMwJlcR8vFAk3jhbwOQkbNr0mE6xXRDoNLrV/FWedI=; b=U65ESopAXkeSgEr2/g2JOHhhCknM0bcCqDoIXoWZmLLsv3LELrgmirdJP6VUxk7SUm rY6PHDKZpY9+M/+K0DtQnfZCD2+OfK1JQl+SCcb0SyWDEyHsE4gfRDpmrVmtXo+6zrtK dF2KbXdjtNCZ9+5P+m1H/liItzlda/khwv5T/5XAu8kJADMiJ8RIC0EpwPN4GWH9p0v4 vhKpAAze3sUU5vsSJuV9XXkCmhFki+LVkU5WApV6YNIgQE4vb6cVybqvvuQsfzPZBB7+ 7TjVWKibpGXP03UV+JUXo6A5U9bC9uOIBfMVgR5UPVga5vVyBOtV1Qj2Tcgfx9YPJCK8 Tg5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750867567; x=1751472367; 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=njMwJlcR8vFAk3jhbwOQkbNr0mE6xXRDoNLrV/FWedI=; b=MevPsIvB54xcRERXf8mU9h9JDci86BdJ57j/fJgyRJCwwYkwephi+qJr5K6vpb1HR2 +O6pUnUliFmVkWWnYvcOVkmsaqU0uxw/y5hSkW4YCWHPGDdodFNsl+vITXPNJpyDgEuU fdBQhuk0wF9ZNci9+B102vBgUdSKfxlEGU41fx1uNQIbPSxoOtB9HccVUE37C4nFXBHz lZ3pwWyYDPlEoaRuZun9wZtk9o40Xpp+Er5HxBHqOdaC+smV0anUKfGqTaD9s9S9B7gR 7CdmQFKciEvwq5n51uW3s/rWfmoiiDGj+ZzbfFud7fWEvU4i8mY8ZJyl3YpDADv5t0ST UZFQ== X-Forwarded-Encrypted: i=1; AJvYcCXtszCSQgsgNuAVroaHtlfAkeq+zMRix2nQ1toMw4G62Ipq1mtQXSnWL4okhAKZJVVSSoTP2DG4s9Oi@lists.postgresql.org X-Gm-Message-State: AOJu0YwN9l3sItARZmm0N9RX5lsvWlM5TxQ89plzN1wIVOwc7cqGW/Qk qX29AplYI4Uaao6RLouusEjsN1KSK1IpuQzUkiMcKiclb2nF7ztz/w98 X-Gm-Gg: ASbGncsend1LnVt4Ozsfvh0cH5p1y10BkSNxn/AFKDJ6Nlh70V2GY3+fxE/wvsFirDa SCb/pxvRdaoJ3wVdY7MHTMJgbn9sCcAVyGXCnKVovqY11u0MDXkrfTeExLm+n0tIzfpG4moooV2 COfYHpbsgkV2AtH93pRfTxO4FwkpSvPrz3MfZC9TT34DlCu1V8p+hgk2rzdGBwrVgW1JCHNcTdG ptxeukDEALGUcP2S7TXLwPOQKG65mWu+BJ3dMsBkNrfAylqCrKVweNjaqPA8vL426/DEkGnYQug YQojXDk2MVhZGgzeOTRiKxaViO+Jqc7QPPJb5vHSb9lDVcF+bWbZtMnnVklVVS30JnGsblM9Aws pjZ0Hc/7TzI29yMBi+4aPbFzlAcukkAnbDFr2NEG4PSC8pkeix2Lc X-Google-Smtp-Source: AGHT+IFycI1ABZtMVCx3hI6PYl19roJoexfvp7YTeqVZXdCsl5T2BQ1qpPC/pDIL9v8jzJZPYSYlkw== X-Received: by 2002:a05:6e02:1569:b0:3dc:7fa4:845 with SMTP id e9e14a558f8ab-3df3294eae7mr46567445ab.20.1750867567215; Wed, 25 Jun 2025 09:06:07 -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-3de37643cafsm44188175ab.31.2025.06.25.09.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jun 2025 09:06:06 -0700 (PDT) Date: Wed, 25 Jun 2025 11:06:05 -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: multipart/mixed; boundary="tHVdw3fiIHnjo3EY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --tHVdw3fiIHnjo3EY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here is a tidied-up version of the patch. It's still quite fragile, but AFAICT to do any better we'd need to return more context from find_option(), and I don't think we can change that one on the back-branches since it's exported. I assume we don't want find_option() to create a placeholder in this case, either. I'll continue to look around for a better solution... If we wanted to open up RESET in this case to everyone with suitable privileges on the target DB and/or role (as proposed by Tom upthread [0]), I think we'd just need to replace the "return false;" under find_option() to "return reset_custom;". [0] https://postgr.es/m/2474668.1750451081%40sss.pgh.pa.us -- nathan --tHVdw3fiIHnjo3EY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v2-0001-Allow-resetting-unknown-custom-GUCs-with-reserved.patch