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.96) (envelope-from ) id 1w1tw6-000hWV-2o for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2026 22:27:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1tw5-005zH3-24 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2026 22:27:50 +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.96) (envelope-from ) id 1w1tw5-005zGu-15 for pgsql-hackers@lists.postgresql.org; Sun, 15 Mar 2026 22:27:50 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w1tw3-00000000KKw-2Ufe for pgsql-hackers@lists.postgresql.org; Sun, 15 Mar 2026 22:27:49 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2CC417A01C2; Sun, 15 Mar 2026 18:27:46 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Sun, 15 Mar 2026 18:27:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1773613665; x=1773700065; bh=lEJA9Jpu7w MdbmBxvFR7avWt5LAelq3I1EiglqUAWFA=; b=GIgVa3nJ0p7FLhozr/6vKfiQDG seef1Qxf/cfYWMw3Xa0FVeRdsJhQyjRZrPcxgVM78cyqbUdAHo+c/BTSqo+LHtXQ FKSvET/n/hW32iBviIj/PPvX+o0W6g+U+qwsPBnwy5DLDRrA4P4aN09Dp0dqT0uE VFuncHKhywrYxVkByioWtqEJVamzoOZbhj5tTZFg0JWlQkuJ+xV1/Gdj/xX72JgN B/OG5W6yb1KZ3lYhOViUTQjVbPfX/lLrU3LDYkMqN3c6MToMT4/3ke8jRhQU4J4U wyYHrVBm2liqVgBP4q27DdcDEyB3Aq8tQKH/UXilb0OzAudN8SWUllmEylWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1773613665; x=1773700065; bh=lEJA9Jpu7wMdbmBxvFR7avWt5LAelq3I1Ei glqUAWFA=; b=P4ytyzBMsfLmP2uZlGbFCW4wMYNlugiHB8sYtTovaTRrT4K1mNE vF3B4FP+jFs8OfJFL0bWFrgFXnRc79kK8uqpKL3zfYsf1gcR5iXAd2SJifpSKY+n eDeVM1TU/RzICfSl7p72+o2HuZljGdINEAOduXmOi9kR45d9tJctlSXrvMG+Enbo absiNKpOONlwJWM+mojYcIleKOvQvZOCB8Lq68v6RqlApzEC6S6HvsKvHkGRC9Ir iXwgoALhh4mWel1XDydRz8N8QshbAbL0fQf7S/aPb1oaOYKi2uR1e3GfzSt4xhRt Wk8a6n4vajnV4PlSS1QTFxp/rWTi5a25Cyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvleeiieelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepiihsoh hlthdrphgrrhhrrghgihesphgvrhgtohhnrgdrtghomhdprhgtphhtthhopehpghhsqhhl qdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Mar 2026 18:27:44 -0400 (EDT) Date: Mon, 16 Mar 2026 07:27:40 +0900 From: Michael Paquier To: Zsolt Parragi Cc: PostgreSQL Hackers Subject: Re: gen_guc_tables improvements Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="on9ghC3gredbo+iK" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --on9ghC3gredbo+iK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Mar 15, 2026 at 12:18:53PM +0000, Zsolt Parragi wrote: > While reviewing a patch, I noticed a typo in guc_params.dat. The code > compiled and seemingly worked, and I was very surprised that the > generator script didn't catch the mistake. Nice. > I was also thinking about adding validations for the enum/define > values (config group, flags, guc context), but that requires a > somewhat fragile extraction code, and I decided to leave that out for > now. I'd say no on this one, which would mean going back-and-forth with the input. If these fail due to a compilation failure, it's not that bad either, it would be easy to pin-point that the failures are related to the values of the GUC, not the overall shape of the data in the input file. Saying that, it would depend on how much complexity this adds and what kind of validation we'd get out of it. If the additions to the script are simple like the ones you are proposing here, that would be probably OK if these improvements catch a bunch of ground-breaking inconsistencies. If the whole script would need to be refactored, probably not. > What do you think about these changes? Such sanity checks can save from stupid mistakes, for new or even seasoned developers of the tree. When I worked on the wait event parsing scripts or even the query jumbling for DDLs, I have noticed that checking ahead the shape of the input files to make sure that correct C code is produced may not catch all the mistakes, but catching most of them is more productive than catching none of them. The GUC script is new as of HEAD, so it seems more useful to do such adjustments now. -- Michael --on9ghC3gredbo+iK Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmm3MlwACgkQnvQgOdby QH35Pg//VKxT/0nnJzzCWZp3LFAwtyOr9Lsa5VUPTwq0KHq2jql9sy6+nR0/zNWh ++NAdREOpoFTn3IuuIkdQGANEKbJ/ByhsIu8EG6oBvAABEXAAy4UClCu2LwLdVJh lIlxW8pnjOxW1jEt+UYqpy8dclbrBBQYz352ssuP943q5QOQaFyH4JwUXScIGAnn W/TfANlihGI/z13jBNrKapkT5i0YWHslaTYi3SEqx3xCVRoELLZc1zi2YEcLG/RG P/Gi+mLOh85Z+wdyITv8kF0Zk/V4N9SUQTZBTi+JF/7QZe4RHeW+B46LnYEIOCjv 2b7p+XGCgvOfABRypBEVBgQEy+2CwL+kV5AR3+umSdCLBN32qeT6q2aaGVvQRpqd XNcgoZo4cSUBOZ9IKPA4/AxJuQ745dBrRhYIspGCWjM+VgoqfY3IoYSYATzRhv4U ahy8jIksaYIIUZgMF9WbXIcAAVpmS2ED9xcsH75p7m4O0TE+JeiAM3ZfZfV69izm xoiP1TCEEpDg84O2z8AoXnIsuBmVzLz/79se8QeZ6GrlUj2XT3cuIzLFE+NA15gS MPuiUad8ZTcCPVnhgVrVZTGX2zTveUCufnte/PCrAxRbTTiwe6Ru4eV6j2Me5N7s 3mIvRnlUvcEMm/d3vED6FQLYfQMQ32K2TNe2n2FGvJYHPYEab1c= =Zn6G -----END PGP SIGNATURE----- --on9ghC3gredbo+iK--