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 1w3Gzq-0014CP-1g for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 17:17:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3Gzo-001Ogt-0J for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 17:17:20 +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.96) (envelope-from ) id 1w3Gzn-001Ogg-2A for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 17:17:20 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3Gzm-00000000295-1Unw for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 17:17:19 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-b9358bc9c50so142753166b.1 for ; Thu, 19 Mar 2026 10:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773940637; cv=none; d=google.com; s=arc-20240605; b=Q2VFu7DhM5DLlT9uDUciQysRWKAPbfwyBd8KtMKpsBoIJdkAuVwn8ZJ9wSA1disiRa VMFq89hGL9TTLje5A0MV6zzISGfdpSebg6yhxf0zA2EciG9RpbkV0R8ccYQHyBmeOQmy Kism3rQhs49k1fzT/PUSDt1InW8blld80vPAwaY2lGih2EYGjRgNMwjcEPev4/SNKlxu ig6czSSd3LDcCuVR202IHiFo4AGZxGMuJyq4vPNp7IhJIU4U1eorf+HuTVHoLQ74ZypG 3wqMs9F1PPpgcJra9Na8YmRcsrvpMrOZvD51O13qLSefqczEcYhWTyvYO7rTk4AoNtxM lgrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TL94tpV6omYek5DXGjxYyd2yt4GpghYT0+0i75JEwYk=; fh=YhmxPC0NYagsxVMppzYMgO0XMWsRSWzMegLjmIklu8U=; b=JchJ4BBv6DorpQZ/OeAQqjCkQ/ioCiJJWz1OQlqODa+zT2ZNhPuABI0thuIonAILOz ur8aG/Hqqugd5NrplOh0dXOXFFbASg36JUHZTY1NNxsNsCo6R1rCGSHicYunkk7DNoES xrznANkv9WyC/7P7H5m5sV87MNEfsVdAqn+lA/FS9aXoNS+wfMMuWwAQeYAqeax7jOJF NUaBY9L+2LXgOJVStl4fr7RZZoTecFnbGqGlkp7aZwZWmsskDTHVPJ7sfwMYzPvKqslZ AF96JvT/9WgblQvQQ8tVkX4T0czeB1gthBVK4/1LSfADsD7sqCH039VO9KCv7SFo1crB aUGA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773940637; x=1774545437; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TL94tpV6omYek5DXGjxYyd2yt4GpghYT0+0i75JEwYk=; b=dONANrDYADJjKlp5STUi7frRmHJsvWoVR2ZBnqUhvUSRxbtr/SZOAOlwAec1XmLwXs VUlznB8+GiQYusBeTlQ0mBMdOaRdFaDqgL4RS5/1ffPrNEF9A/dQUrMlDEHf2epm2xk4 E7BrIMk7IFDFGGTtPVI/srM6JUPe5A+8qhvslZP9dugd/WGxlwr1ISwqMqyT0UDXE5xc SjP2ouskg1BgwW3x8YpAzVRTn2Eat5aKaPnpK86leOCLi0nSn0zMFYiBLcDbzvbNuQMt oWTZCMmh9Ur4rllWZzhLgI6oBa8cLT7lrwvx+oqR5E9AACqmE8BXMongfU3PaYDV+dHh u/8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773940637; x=1774545437; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TL94tpV6omYek5DXGjxYyd2yt4GpghYT0+0i75JEwYk=; b=gQKrRyQnFXkwiJVfCK5wf95JcP9deiUEB5x3UIWDuX4p8vJVyHqAUlGfcOK82g/uLW E11T/QGLV/QQwfiHt6Kbgr3uOT6GyPrJWz1jHDW7TH8UMQwhHat1r2zyaHTTx7YBOo08 Nyfg5Bc5Umxkv37B9klX+XRi+QyCGVCg4S/nlkqzMopw+iQOra6xHWgMwb+RtFup0JkH w3JZBBmG6axr1524q3YwqoP1XRh+gVbvO20M3CTaTquC0j3rrfH4jLEytgPVHhH0Mf9c RnzJHrpiqIlaYvnFBAm078JT2a/CJLZL4i3dVM6jTeIb/osTNou2CmaG/SKOCmdKVopH GvfQ== X-Gm-Message-State: AOJu0YyIkvtG7vve2f0gUKp6JOJERd6tXLIKhlR+X6Zq08EugKu4KTrL fAKgnFXAweHkn0BvSnscLUkwG/DZmBd6YR0uiFrKqAbIoH4oM/6eSqU6jggkKmCP3t9fvsvi+Jl mq7PdCDgFkaRBchpEBkabrmXU3SQ5kxA= X-Gm-Gg: ATEYQzxlJMG1NrWDk5YxxC9mKCpMknXcs1VftYgv537oqTeZ39lQ8okMjyp81LB8Swh 2F79rs2OyCOx5Ox2YGpcF8DIs0IQxREPqG4LI6NPemllRtzDQtNxxzpHSGaOrv92FTq/r9FcA0W Qs1+UxXqs2nZblD3tcdQ9OzpHoUaWaWnMWA92aHIr8MKAztuz2qTns1Bi/Z8oR/z4Gg3q0dV2+Q eEKiAXb1F0jg7X+MJosx8PicxUmStpQK1oztzBPpHqkbLog8gFS+TDkwtp5yMiDjfwu7FFtMTdH 9I8ql7ZCnuVEn4xrERut/QfoavkmcfrV9la7NUs= X-Received: by 2002:a17:906:2c55:b0:b98:49d:7e37 with SMTP id a640c23a62f3a-b982f372a94mr9336066b.44.1773940636777; Thu, 19 Mar 2026 10:17:16 -0700 (PDT) MIME-Version: 1.0 References: <1136161.1769654478@sss.pgh.pa.us> <1299934.1773938807@sss.pgh.pa.us> In-Reply-To: <1299934.1773938807@sss.pgh.pa.us> From: Robert Haas Date: Thu, 19 Mar 2026 13:17:04 -0400 X-Gm-Features: AaiRm50raVpNOLuPmNektk52L-s4n6EDh-GfJJUsUv7k5g7hNotJzgdYlkSFmoc Message-ID: Subject: Re: pg_plan_advice To: Tom Lane Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 19, 2026 at 12:46=E2=80=AFPM Tom Lane wrote= : > I just realized that this new test module has added yet another > execution of the entire core regression test suite ... and to add > insult to injury, it runs the planner twice for each plannable > query therein. I think this is an outrageous abuse of our buildfarm > and urgently request that you find some less climate-destroying > way of getting reasonable test coverage of pg_plan_advice. I don't think just nuking this is a reasonable option. During the development of pg_plan_advice, test_plan_advice was the single most valuable testing tool. It was not close. Manual review, both by me and by others, found bugs; fuzz testing by Jacob Champion found bugs; AI code review found bugs. test_plan_advice was an order of magnitude more effective than all of those things put together. In fact, I'd say maybe two orders of magnitude. Pretty much every significant logical error was something that required a very specific query shape to find, and the regression tests are by far the best repository of weird query shapes that we have. I think without something like test_plan_advice, the chances of us noticing if future planner changes break pg_plan_advice are near zero, and with it, they're quite good -- because we're not only testing the queries that exist in the regression test suite now, but we're testing future queries that are added to the regression test suite by people who are hacking on the planner. Those added queries presumably create plan shapes that are relevant to the code that they're changing, whereas a fixed pg_plan_advice-only works if people think to add something to it, which they very likely won't, and even if they do, I have no confidence that they'll know what things to add and what not. I certainly didn't know which queries in the regression tests were going to break under test_plan_advice until I tried it. One thing we might be able to do here to save on cycles is combine test_plan_advice with some existing run of the regression tests. We seem to run them to test sepgsql, to test pg_upgrade, and in 027_stream_regress.pl. I don't think we can piggyback on sepgsql here because there are too many cases where it just won't be built or tested, but we could possibly piggyback on one of the other runs, or on the main regression tests. If that's not viable, another option would be to have it run on only some buildfarm members rather than all of them. But if the tests aren't run by default, then I fear people will experience quite a bit frustration the first time something breaks only after they commit. Before I forget, another idea that might help is to see if we can tweak meson.build to start running this particular test earlier. I thought about that during development, but I didn't actually do it. If the issue is that test being last to finish, that could help. If the issue is total resource consumption, it won't help with that. > I would dig into why grison and schnauzer are failing this test, > except that I don't agree that we should be running it in the > first place. I'll go have a look. --=20 Robert Haas EDB: http://www.enterprisedb.com