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 1vdzSB-007YLF-1E for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jan 2026 23:30:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdzS8-004nWK-3C for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jan 2026 23:30:05 +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 1vdzS8-004nWB-0A for pgsql-hackers@lists.postgresql.org; Thu, 08 Jan 2026 23:30:05 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdzS5-005Mm0-01 for pgsql-hackers@lists.postgresql.org; Thu, 08 Jan 2026 23:30:04 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1F1EF140014C; Thu, 8 Jan 2026 18:29:58 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Thu, 08 Jan 2026 18:29:58 -0500 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=fm2; t=1767914998; x=1768001398; bh=XtDfILvlo0 RbDOX3mWwNiUlHPK50ooU3q0GwNbkSzE0=; b=B66dXnS0rDeBICzq2vISlGczd0 S274Fbrgn12S28TEdsYQ9mhknyg4S61kqr7SW57mz35q28KLV/I3VHvTN7w2PZ3W Nfsiv51fQ6apY3phS1nUmb0WSWbHDlPyIQ7PZL3B0ncpdg3Qeb/dz1h/SG3IYxEb gOQ0htLkt+2LrptH/elwSMfkSCuWUX+DaFM3TgfnDqfJqPe/CzWg8uRKuQ2M0lmw KxdGLbizXMvvFN6oLfoXHvKQ/tydPCSe5j3fTB4z0k14OS3gYoAzy/G2GxupP/q/ LX0+hvF6xvPs3Md+B6Jw9t0f9E2Dqz7Z1IkNGRRreBXrhm9Hj7KJ5nmOaSDw== 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=fm2; t= 1767914998; x=1768001398; bh=XtDfILvlo0RbDOX3mWwNiUlHPK50ooU3q0G wNbkSzE0=; b=G9q6XCc33AOzn5sJJvxL8zAmV/UjkV139GhaerWJ8TbkQznu+Mb n9Yb7QHtnrdJXGikb8G70dVqZezcWtQU+txoVAAjbjLqY+fiqxrleUiizzBNP4nH WkjXRYz2GNal7BYzSUjB6FOrlsTHU5nRAGfaNMGUPRw/wgq9W8ves/wlgSKv/Roi wep/aNfu1w3MJd5cat5gjNrwJr1R+bBP4w2htbAV9ZqRKYkqSw1Y/LFdNqLmFQGF rIQ2boOiaQSbMP4RrVcrzNES1TFcEqW/GX6Mo9adJor7PgnHp5gCvxJLB0Qhmoaa hRQKZ4XamjFMdqC2xn1WF5e7ZIq+I0kORbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdejvdekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttdej necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepveetjefgjeevgedukeehieeuieeu ieevueeiudegheevuefggfduueelgeelieetnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhosg gvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphhtthhopehluhhkrghssehfihht thhlrdgtohhmpdhrtghpthhtohepjhgrtghosgdrtghhrghmphhiohhnsegvnhhtvghrph hrihhsvggusgdrtghomhdprhgtphhtthhopeguihesnhhmfhgrhidrtghomhdprhgtphht thhopehmrghthhgvuhhsshhsihhlvheljeesghhmrghilhdrtghomhdprhgtphhtthhope hjrghkuhgsrdifrghrthgrkhesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthht ohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorh hg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jan 2026 18:29:55 -0500 (EST) Date: Fri, 9 Jan 2026 08:29:38 +0900 From: Michael Paquier To: Robert Haas Cc: Lukas Fittl , Jacob Champion , Dian Fay , Matheus Alcantara , Jakub Wartak , PostgreSQL Hackers Subject: Re: pg_plan_advice Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p54KB3Mjd8/gFK3a" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --p54KB3Mjd8/gFK3a Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 08, 2026 at 11:07:31AM -0500, Robert Haas wrote: > On Wed, Jan 7, 2026 at 2:04=E2=80=AFAM Lukas Fittl wrot= e: >> That said, good news: After a bunch of iterations, I get a clean >> pass on the pg_hint_plan regression tests, whilst completely >> dropping its copying of core code and hackish re-run of >> set_plain_rel_pathlist. See [0] for a draft PR (on my own fork of >> pg_hint_plan) with individual patches that explain some regression >> test differences. >=20 > That sounds AWESOME. So you are telling me that I can commit code that deletes code. Count me in. The project has some merge requests that I've been holding on a bit due to what's happening here and because I did not really look at the internals that have changed. It's great to see that you have begun an investigation, Lukas. >> The biggest change in the regression test output was due to how the >> "Parallel" hint worked in pg_hint_plan (basically it was setting >> parallel_*_cost to zero, and then messed with the gucs that factor >> into compute_parallel_worker) -- I think the only sensible thing to >> do is to change that in pg_hint_plan, and instead rely on rejecting >> non-partial paths with PGS_CONSIDER_NONPARTIAL if "hard" >> enforcement of parallelism is requested. That caused some minor >> plan changes, but I think they can still be argued to be matching >> the user's intent of "make a scan involving this relation >> parallel". >=20 > Cool. I'm sort of curious what changed, but maybe it's not important > enough to spend time discussing right now. I suspect that this is going to be an incremental integration process, and it smells to me that it is going to require more than one major release before being able to remove the whole set of hacks that pg_hint_plan has been using, particularly with the GUCs, the costing and the forced update of the backend routines which is a ugly historical hack. Saying that, I would need to look at the plan outputs to be sure, perhaps we would be OK even with slight changes. These happen every year, because the plans tested are complex enough that some of the sub-paths are changed, but the hints still work properly. This year for v19 we have at least the changes in the expression names. -- Michael --p54KB3Mjd8/gFK3a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmlgPeIACgkQnvQgOdby QH20vw/+I9+6nbMvyaQIAOTZmufsrUEaEr5WKHR0w4tCgNY9N7r/WOTjv7JbMsx4 fdvrgjJcHX92jlVPoRyoyGdPU4gu/6cOB9YcRi8fjQclXTz7VMKqAWqELmaxwpe5 9MN0gn8FKojrG7sIQDObyLCv22en337/auBHaxXeZDaWnejGAtSeIhEwLp2AGEKF MW0u4UNvvh/lbScca8sshgAVyaIbOvSJjhqy98V0iP4b+2jysmm3+AdqEvAtQCx0 Ehu9AVpq6zNFNn1ESQvZbArcCGxNSvG2YommqhptLjG1kWBoNMcdCREpiap+V2s8 JmTtazBSJUtNsSvIBHe6uOjcggExvM0I7dPbyOSVufSisTWTesFdNf+cOfZU68Rb eaU2O36uEEpESBxQ8Mir0G07T4ovHx2J6odBE5Wv93lZHowHnFVw24y2VbqprIQK xbtvlj/bN/Y48mid9+LzxjefA+w0wveK0Z+bb/pEQIs1/sNvW9IhBah8hD+d+Owq b7hzW5usAHN8oiHnnmsZW4TRmauYmIheeNkv4qdSfc6/FBelf9Agh6Is85dkDLFV AjchdHvQXKGseUrIKAAL5ylYr2HShQRIK+TyQCXaewbF01/Soq63jPiWUkz+/8c3 QRsvFO61K9lmikmAprl9Weiaq5FPvnm7EPQv8q7K/slnMPHva/M= =hwza -----END PGP SIGNATURE----- --p54KB3Mjd8/gFK3a--