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 1uSho7-00Bz1F-Dh for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jun 2025 19:53:51 +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 1uSho3-0041T5-LT for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jun 2025 19:53:48 +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 1uSho3-0041QC-CL for pgsql-bugs@lists.postgresql.org; Fri, 20 Jun 2025 19:53:48 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uSho2-0036lL-0T for pgsql-bugs@lists.postgresql.org; Fri, 20 Jun 2025 19:53:46 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-86d0168616aso222364339f.1 for ; Fri, 20 Jun 2025 12:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750449225; x=1751054025; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=s8rPbnRe80Nwhhc0niHMmXMT1Kjdvh6clVGGsAXjVSw=; b=UxJM94J0+rC4u9DnNTq/x1NGK0jbRhX2Iiguc4HIWqZk9PT5DLUP1k0l2vFdQCS5Q2 XgUgW+AFVzg3bmvJt9IMxDoHwqTMGpRie6zKNd+4M05qUdk2UVlXYTt/nQkPQYYTRAGx OJZIngKpEJQ9dJA6cvSZ++unMhwoxwKPelGw0s7AHHsIecIXXlBnax2+z+AUukuTlPHF Oew5DFAQAarQLhukvIhYzGlre5sDkLbTrnJNIl8kNyQv/tRswaT6w/daQygcdPFSpwRS DfvnNtjRzOd6Qq+HYhW7DPAZZch+pyuvthKKRTgaXnNKiAl1R7GGCRd3N4QVuWwvxRf2 O5AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750449225; x=1751054025; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=s8rPbnRe80Nwhhc0niHMmXMT1Kjdvh6clVGGsAXjVSw=; b=MJwZgBFKe+mhXXNw44xJ+m/Fm/n4+JZQtV0NtE+7gWyvd2ScAn5XBRvTCpGqc3ydFW Sp/J7KzOC3moPfLxcPLlLIdRW0haALwgA15WH1xg/XZxwBkJJQJJWeypIOg0HooexP19 MPOjOU17RYu8VhObWWZgIuCls5NGRFyIiF1YRm5hePpCr5GQnOzrJtiu7zmkWQ5rz/8Y tTD9NoaBvm9x7gTC15KfMQlE+lMVzgZSmDmlc7G+r14J/RmXBnJMcfvWe4TF/N6W88Ix NDo1r8J496UfRkMX8ssNsvVfM0rXMetb0KrJ6FfE5furvjvV94hMyyjRtH/A4G4vKj7D WpNw== X-Forwarded-Encrypted: i=1; AJvYcCUk8kcr7WQ2MFWGvoe30pTdsJwgYHKfV3F4TA+1coeVMqYiofL2vescE93W3soyHB9lisPE7kHqsudj@lists.postgresql.org X-Gm-Message-State: AOJu0YwgypuAT/XPkL1G5NGH6lnp6RBCVHe8Gt3/UXIEsy7T9koBEPIm i3qxfpr21J/t1stw4vE0PXeNOZdosuuqYr2jgHPZlarcm3aMD2n6ffM8m7iq/Q== X-Gm-Gg: ASbGnctw/aN7AfAbfHGAElvZVzwSCc3ubccGZq0GfRs6oEamQARvc25IShWpWxGYMmh wD7JoewfrgzkbwDks6aXnlngHT872nlPu2HcNrewgdvm4Bw9aG3rBnqSe8kQP7VcsT/cFVKS8Es DUKr6F6reEGo1nocBbPzTTDYKN2OEx+uCEXUT9vu81XrX6+71Yh1vjA9F7xAyjrDlo/4Qz3oikp 7fjfmoakfJ2N0OwkR1d6x/ckHQrxsKhX1Ze1U4X/u30wYzIayIeFD2N7YLdjoxfq6Ulka090fey uLV8BjDK5+CHQIJlwRDLZtpYiX/X4jMRA8aN15i63ghudQGyuO3jSsDCZ5+A3neIHXks5tYg3+s 4TtxLlmSLFCCKEAJlhIwonmN1VQKFsJsUvQ3YI9YI9OMAUaJziDbe X-Google-Smtp-Source: AGHT+IG4PA7DMgYZuZCGCc88Jrf6+xbwvSpwrPx7LH3ag6ajJKVprxjBGsrC5JkaffuzJLTuemlMAA== X-Received: by 2002:a05:6602:3808:b0:873:7685:6f3e with SMTP id ca18e2360f4ac-8762cdbda16mr482908139f.0.1750449225292; Fri, 20 Jun 2025 12:53:45 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-8762b7ca232sm67823239f.47.2025.06.20.12.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jun 2025 12:53:44 -0700 (PDT) Date: Fri, 20 Jun 2025 14:53:43 -0500 From: Nathan Bossart To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18964-ba09dea8c98fccd6@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for the report. On Fri, Jun 20, 2025 at 12:24:20PM +0000, PG Bug reporting form wrote: > My project uses PostgreSQL (default 14, but later versions are supported as > well) with an extension where one of its parameters was removed in a later > version. I had applied a non-default value for this parameter using `ALTER > DATABASE immich SET vchordrq.prewarm_dim = '512,640,768,1024,1152,1536';`. > After upgrading the extension to a version that no longer includes this > parameter, admins reported that each connection emitted the following > warning: > ``` > 2025-06-18 23:32:46.765 CEST [49] WARNING: invalid configuration parameter > name "vchordrq.prewarm_dim" > 2025-06-18 23:32:46.765 CEST [49] DETAIL: "vchordrq" is a reserved prefix. > ``` > As a solution, I added a migration that removes the now-redundant parameter > with `ALTER DATABASE immich RESET vchordrq.prewarm_dim;`. However, while > this worked for our CI that uses Postgres 14 and for admins using 14, we > began getting reports from admins using 15, 16 and 17 that the migration > fails with the following error: > ``` > PostgresError: invalid configuration parameter name "vchordrq.prewarm_dim" > { > severity_local: 'ERROR', > severity: 'ERROR', > code: '42602', > detail: '"vchordrq" is a reserved prefix.', > file: 'guc.c', > line: '1153', > routine: 'assignable_custom_variable_name' > } > ``` > > [...] > > It would be great if `RESET`ing the parameter still worked in this > situation, even if `SET`ing it does not. It seems like we could at least allow superusers and folks with existing privileges on removed parameters to RESET in this case. IIUC we'd need to teach validate_option_array_item() to treat unknown custom parameters like they're known (for calls from GUCArrayDelete()). On the extension side, another option could be to leave the parameter defined as a placeholder so that Postgres knows about it. -- nathan