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 1r6Ssf-000z4B-Np for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 09:53:49 +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 1r6Ssd-009Qo7-VY for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 09:53:47 +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 1r6Ssd-009Qnu-Lr for pgsql-hackers@lists.postgresql.org; Fri, 24 Nov 2023 09:53:47 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6Ssb-0077Yb-1M for pgsql-hackers@lists.postgresql.org; Fri, 24 Nov 2023 09:53:46 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 349893200A18; Fri, 24 Nov 2023 04:53:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 24 Nov 2023 04:53:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700819622; x= 1700906022; bh=kSPqgr/lG6ZLiJU3Hguv908gXFLNjpxvwK9yLQgchq0=; b=l RDk4afHNx+Nk3a2Qpw7b4cP7cPpZHfzH27dLimfdgZ/XJR39rKikj63Z9d6t6UDB UiXZLtXUNRi6eX1BayExzyFe2NfWo8+3xvZMNPMpTwMvoeKAY4q7pvnAt7Y/7j5i eoGdAMqK7cv4JZEzbjTfHSq38wZO7pj3N/5FN1C7QAMgzoggjd1QFRIMRWYc+LWk hk61aK9844elhn6FTGTzvGmTf3M5ueuQ7q8WOWZaIpyy9ETtFrFyyvgneYHm9ESy JqexgFxsjWirS9P10UZvyKAcv2iFKYZXueJTzGAgIkbk9KIMDodz6RegnlWBgrPf p74MW9te7S02a1QnD0SuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehhedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepledvkedvueelteefffevjefgfeeuleehjedtieevjeel ffegfeelgedvteekvdetnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dpphhoshhtghhrrdgvshenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Nov 2023 04:53:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1700819620; bh=lIzwLepwskqRj2eZTmuwG4k70Iv344GAcZbDgeEpP/o=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Rx8l/8NTWJjolUDitnB2MiyGrgtdUuMvXwWazgSE5O187xOdkjnQLeE2frEOn1cEh Z3/ukTYBoNfMN7Dn/KqOsGGiqz7txo5mADjZZrXZz/2T/eT0X90/t+rpgz1kDFFCP2 t9uiCVXSQGQed4H5yqk4eJXb76YDxDti5HYx7CHFkahQLUTAGqYvNylvKsgWiILTOv p084F7OKqSxS3nU7fAeAGHarSGU9UukesseVjXf9fjyRUqzcHqP1HnEX4odWj4fflA UGY0G2INCL/CSq5hZELLMEnZeUziHPngcONBw+gI+3vfGryt6hYVqGw4rJeozpxbxK /YvSRHgfA4seA== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 99182DB; Fri, 24 Nov 2023 10:53:40 +0100 (CET) Date: Fri, 24 Nov 2023 10:53:40 +0100 From: Alvaro Herrera To: Michael Paquier Cc: Peter Smith , Nathan Bossart , Laurenz Albe , Peter Eisentraut , Tom Lane , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: GUC names in messages Message-ID: <202311240953.6linnh7oxsdn@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Nov-24, Michael Paquier wrote: > On Thu, Nov 23, 2023 at 06:27:04PM +1100, Peter Smith wrote: > > There may be some changes I've missed, but hopefully, this is a nudge > > in the right direction. > > Thanks for spending some time on that. +1 > > + In messages containing configuration variable names, do not include quotes > + when the names are visibly not English natural words, such as when they > + have underscores or are all-uppercase or have mixed case. Otherwise, quotes > + must be added. Do include quotes in a message where an arbitrary variable > + name is to be expanded. > + > > That seems to describe clearly the consensus reached on the thread > (quotes for GUCs that are single terms, no quotes for names that are > obviously parameters). Yeah, this is pretty much the patch I proposed earlier. > In terms of messages that have predictible names, 0002 moves in the > needle in the right direction. There seem to be more: > src/backend/postmaster/bgworker.c: errhint("Consider increasing the > configuration parameter \"max_worker_processes\"."))); > contrib/pg_prewarm/autoprewarm.c: errhint("Consider increasing > configuration parameter \"max_worker_processes\"."))); Yeah. Also, these could be changed to have the GUC name outside the message proper, which would reduce the total number of messages. (But care must be given to the word "the" there.) > Things like parse_and_validate_value() and set_config_option_ext() > include log strings about GUC and these use quotes. Could these areas > be made smarter with a routine to check if quotes are applied > automatically when we have a "simple" GUC name, aka I guess made of > only lower-case characters? This could be done with a islower() on > the string name, for instance. I think we could leave these improvements for a second round. They don't need to hold back the improvement we already have. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "You're _really_ hosed if the person doing the hiring doesn't understand relational systems: you end up with a whole raft of programmers, none of whom has had a Date with the clue stick." (Andrew Sullivan) https://postgr.es/m/20050809113420.GD2768@phlogiston.dyndns.org