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 1qsRXO-0084yA-RS for pgsql-docs@arkaria.postgresql.org; Mon, 16 Oct 2023 17:37:54 +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 1qsRXM-0036BW-HS for pgsql-docs@arkaria.postgresql.org; Mon, 16 Oct 2023 17:37:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsRXM-0036BN-A8 for pgsql-docs@lists.postgresql.org; Mon, 16 Oct 2023 17:37:53 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qsRXI-00129B-CF for pgsql-docs@lists.postgresql.org; Mon, 16 Oct 2023 17:37:52 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32d885e97e2so4699637f8f.0 for ; Mon, 16 Oct 2023 10:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697477868; x=1698082668; 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=EgvrKlntf3ECJdE/TJf35ib9HOn5FAl4O0yiSgvWHSI=; b=QYgOx6k3j3603LMVh2CwI57/3XQwJajXkNUw1qMSi5WFPr5OccpN3g8n38rSP2Gdoc R3UYMsQpQkdq0I4Qg9lutq9fHfMesDkfYCd/LjHrWnyzFWAEKg5MHfvHxa7n9z9jjHrB XYp6CvMhLN47vWb88F1l4qrqLOWmdJCcfYX8HQ3gRONbehGHO2t/8nIwx0itDzr9+o9q YHI23nfPZMCbXTTDjteyad5Wzf8VV9PAiK3X7TJCUuuJ82wYo0GsfdXvwruafd/LY644 P1n2VcPUMMPEOo3jSEbsCFut56WFJIR2X4UZGhFKeO9oUb2U2UzYAqLtBPTuKlfnoF4D OxPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697477868; x=1698082668; 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=EgvrKlntf3ECJdE/TJf35ib9HOn5FAl4O0yiSgvWHSI=; b=MEWeUy4aEn625XZBgEjU+05qu/7jkNScVvjlsAymI8T6JGW6+Zt2BIDtw8DozWiRtv 437vWo5LC3t+6WXFo4e6DlZRxMdDnU+3ezFPDavmwvI2yU2Z7Z2wp/FGe66y40tfSpfZ oAC00cCs3il0RqW514OXJYqYta2O6XqSyy1sPTTZ+uDWJex99prVGgFfWWwF4be9hT2O 96EeQMNFbSANC9BVL7kSXLJ3Ps+THJuiugJLb79CUawwaEQVyOodj48mJlK76QWUCR2O b8ym2V6wEP9FdLDdBUxu4py1OvA+a9vZiiJ2T7eqEgwDI7ZNYlD6eSgIAW8zoI8PStSZ 5wDQ== X-Gm-Message-State: AOJu0Yx4t1ACxzCpoMpJW8hH1xsDoOc1wSJ3F4XxmBewyWy+tuV8kbYL KpesXZ2ZzTrPrzmbBu/oKPlUWg== X-Google-Smtp-Source: AGHT+IE2fudv9ap4RmZWxGdRShwW59zh6U6rET70g4oGYgYJN6y8g5FSAlSCpoYuzzMP6r1B+6edrQ== X-Received: by 2002:a05:6000:43:b0:32d:570b:c0a4 with SMTP id k3-20020a056000004300b0032d570bc0a4mr92583wrx.27.1697477868110; Mon, 16 Oct 2023 10:37:48 -0700 (PDT) Received: from localhost.localdomain ([2001:871:260:b5a5:1e7:987b:2d5e:f995]) by smtp.gmail.com with ESMTPSA id o17-20020a5d6851000000b0031779a6b451sm27544899wrw.83.2023.10.16.10.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 10:37:47 -0700 (PDT) Message-ID: <19600510deacf21b05a2c76bc3bde8d1283c77e3.camel@cybertec.at> Subject: Re: "20.16. Customized Options" =?UTF-8?Q?=E2=80=93=C2=A0cannot?= be set by `ALTER SYSTEM` From: Laurenz Albe To: Tom Lane , gavinpanella@gmail.com Cc: pgsql-docs@lists.postgresql.org Date: Mon, 16 Oct 2023 19:37:46 +0200 In-Reply-To: <2307198.1697473749@sss.pgh.pa.us> References: <169746329791.169914.16613647309012285391@wrigleys.postgresql.org> <2307198.1697473749@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2023-10-16 at 12:29 -0400, Tom Lane wrote: > I do see an issue here: >=20 > regression=3D# ALTER SYSTEM SET foo.bar TO 'baz'; > ERROR:=C2=A0 unrecognized configuration parameter "foo.bar" > regression=3D# SET foo.bar TO 'baz'; > SET > regression=3D# ALTER SYSTEM SET foo.bar TO 'baz'; > ALTER SYSTEM >=20 > and now we have >=20 > $ cat $PGDATA/postgresql.auto.conf > # Do not edit this file manually! > # It will be overwritten by the ALTER SYSTEM command. > foo.bar =3D 'baz' >=20 > So that feels like a bug: we should not allow ALTER SYSTEM to execute > against a placeholder GUC definition, because the placeholder can't > tell us whether the value is valid.=C2=A0 I wonder though if forbidding > this would break any legitimate usage patterns. I feel the same. However, the lack of any "variables" in SQL (as proposed in [1]) leads a lot of people to abuse placeholder parameters as variables to hold application state. I am sure that that is where this complaint comes from. We maintain that doing so is not a valid use case, but that cl= aim sounds increasingly like a grammarian declaring that sentences should not end with a preposition, when everybody does it all the time. Yours, Laurenz Albe [1]: https://postgr.es/m/CAFj8pRDY%2Bm9OOxfO10R7J0PAkCCauM-TweaTrdsrsLGMb1= VbEQ%40mail.gmail.com