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 1uf39d-001TIW-3Q for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 21:07:05 +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 1uf39c-00BGZO-4f for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 21:07:04 +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 1uf39b-00BGZG-RK for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 21:07:04 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uf39a-000c3i-1o for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 21:07:03 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-45629703011so11120025e9.0 for ; Thu, 24 Jul 2025 14:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1753391219; x=1753996019; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=krQ9QsndMV2GisoAb9n0wiJrHIvyMQ/C5Ek6Bzwu7cM=; b=XqbtoR+AHovHrMADMZrzF4/e5YBbir2uu2hFBfHpCwPJmzA7vLzrSkhgba7t5Khe2a OpdtymsPpsTwtrWNA/YyiLIn3/sroa3/0IrQ+t2L+fhDJFQuNyAEjk6jiKNrC77mWEfi qGVrbyf90C2DM2bFPSj4rMtolRQfvyD8UU+O8TZ1ItimtJCNWnezOKkhsKrzQOhnO5uX fFO9qn2TOALsK4FuVDfYl0Aogtogd8EaIE64kppYyFAk99zNZdic9GRPgazwfrT5Ypg+ DeXGk50G9F1s35hpac4dejTnas9JtmccnDQz4HCJu6w7YWKc1KsRei3Ox8RUQ4PKzVX9 R40A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753391219; x=1753996019; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=krQ9QsndMV2GisoAb9n0wiJrHIvyMQ/C5Ek6Bzwu7cM=; b=mFl2GesbSi1bVaDyUwLOgJ6wf88eAxR7fXBVs6Y76e9TCaWUNF/Bw86E61gVqwR0QZ OzQuCf9fPiUwGQq35dOqAFKXZeZOx3I5tNsEscnXYl3vL5b4X3lf8vDl/LoXl9LYH6nT 2WNuDbT/Nb4zET1UxcTi085FY0m11zIAEo7qJIwWUThGpFGFViiJreqqvp+DFDq7ftvG bLH1p0fDnvoi+ySri9LM45g1Y8mAXD28ISpAK4Pd3FqdQ7hpNeYNVEuwOhug0sOKMxJY dmtx3XUvP2C0UAJez12bmwvg6IQ3CQ9u4h/FsAw5yvUY8ELli/9JFawllr1QIe4aLKNH SR4A== X-Forwarded-Encrypted: i=1; AJvYcCXx+ofKy/o7N2PATBnyKk10JquYJArExiN8Q2URsvL1cyKONuVsmOa/+7fhCb4i69tmmYHIqhOrLrds@lists.postgresql.org X-Gm-Message-State: AOJu0Yy4g9XxpnA4UjhMtAbRTPMCnA6OW6guXxVy6RvBObefh0Dwskml oUy2gZtRelN9nAInOHXAXdIAd5/nfE+YyC4ib8YXx3VFBXpw/iXWs8dzMXn/W9hZ/lQ= X-Gm-Gg: ASbGncsTXTEws/KEVD4VNs0hya1WQlXf6T9k7Yp3d0hS5sQvlk4lBhi5SZ3mKYEoxwM 9vV9u2vv6cuCXOsAvtmXzhwT2ke9lr+fEwEgWY9dE551Ao5VbdTSGOLHDPoiKXzTR90cdOBqF3Y O4WEFBYDl6F1UNpGWojJwZ2P7Gjyycvpk+iSEx+3GyUAm3xgQO1uN06hEz72KLvTsL5OXM7PnMD 8AtLN9SCAYUVRfVXwQtGB6UlMnKLQmr3jYbRDuHdba4epWxj3GhLyQOoRR+ox+3RPlodjJz9eYo eOQZ/5dxCcV/ZwUs4gctPCFPBzAtWFfp6Mhm8+yr6kH8K2GTiCyN+yIESUZiDUhUL0xfBb1L5BH qWuYmOFeUYa7NKt6yrIVpnrGHD+OeO6HI2kmEthbO8PU8ZRkLzEs= X-Google-Smtp-Source: AGHT+IGK2DUftahNZG/woHGJ98W2cO5aZzvF9wQKNP/DP1glbPdvpmAMIE+vVDFordJqDkYtM9LJWw== X-Received: by 2002:a05:6000:18af:b0:3a4:edf5:b942 with SMTP id ffacd0b85a97d-3b768f1660emr7014484f8f.57.1753391219242; Thu, 24 Jul 2025 14:06:59 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:255:ce84:8917:ad95:e45:f3d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b76fc72548sm3176936f8f.30.2025.07.24.14.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jul 2025 14:06:58 -0700 (PDT) Message-ID: <8902b6f8d5c19f09f4a052295b9de41d9f6970b5.camel@cybertec.at> Subject: Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist From: Laurenz Albe To: Nathan Bossart Cc: Tom Lane , mert@futo.org, pgsql-bugs@lists.postgresql.org Date: Thu, 24 Jul 2025 23:06:57 +0200 In-Reply-To: References: <18964-ba09dea8c98fccd6@postgresql.org> <2474668.1750451081@sss.pgh.pa.us> <803ddef427b9016be04af9320925e9570d3fcc06.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-07-24 at 11:30 -0500, Nathan Bossart wrote: > On Tue, Jul 22, 2025 at 04:27:24AM +0200, Laurenz Albe wrote: >=20 > > There is still one piece missing in my opinion: > >=20 > > ALTER SYSTEM RESET testext.swap_limit; > > ERROR: invalid configuration parameter name "testext.swap_limit" > > DETAIL: "testext" is a reserved prefix. > >=20 > > I think that this case should work like the others. >=20 > Good catch. This should be fixed in v3. Check. > > I'd like to see regression tests for this, but I am not sure how > > to best devise them. > > One idea would be to stick them into the regression tests of some > > contrib module, even though it is not the perfect place. >=20 > Added in v3. Great! The regression test works fine on my Linux machine. > --- /dev/null > +++ b/contrib/auto_explain/sql/alter_reset.sql > [...] > +SELECT current_database() AS datname \gset > +CREATE ROLE regress_ae_role; > + > +ALTER DATABASE :datname SET auto_explain.bogus =3D 1; > +ALTER ROLE regress_ae_role SET auto_explain.bogus =3D 1; > +ALTER ROLE regress_ae_role IN DATABASE :datname SET auto_explain.bogus = =3D 1; > +ALTER SYSTEM SET auto_explain.bogus =3D 1; > + > +LOAD 'auto_explain'; > + > +ALTER DATABASE :datname RESET auto_explain.bogus; > +ALTER ROLE regress_ae_role RESET auto_explain.bogus; > +ALTER ROLE regress_ae_role IN DATABASE :datname RESET auto_explain.bogus= ; That is perhaps a rediculous quibble, but shouldn't that be :"datname"? I guess the regression test database will always have a proper name... Anyway, I'll mark the patch as "ready for committer". Yours, Laurenz Albe