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 1x3NXf-006NW2-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2026 00:48:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x3NXc-00G4zM-1u for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2026 00:48:56 +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 1x3NXc-00G4zE-0m for pgsql-hackers@lists.postgresql.org; Mon, 07 Sep 2026 00:48:56 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x3NXW-00000003JyN-1zKZ for pgsql-hackers@lists.postgresql.org; Mon, 07 Sep 2026 00:48:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6870mlhw147107; Sun, 6 Sep 2026 20:48:47 -0400 From: Tom Lane To: shihao zhong cc: Himanshu Upadhyaya , pgsql-hackers@lists.postgresql.org, Andrew Dunstan Subject: Re: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG In-reply-to: References: <6fc72a7d-9f52-4a72-9adf-1912da255605@dunslane.net> <246590be-70c4-4441-a0bc-56dc05be1318@dunslane.net> <178842960036.1140.8272272790033693692.pgcf@coridan.postgresql.org> Comments: In-reply-to shihao zhong message dated "Sun, 06 Sep 2026 20:13:13 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <147105.1788742127.1@sss.pgh.pa.us> Date: Sun, 06 Sep 2026 20:48:47 -0400 Message-ID: <147106.1788742127@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk shihao zhong writes: >>> create_upper_paths_hook has no test coverage anywhere in the tree > I agree this patch needs test coverage, so I have attached 0002. It > reuses test_extensible, which already installs a planner hook: a new > GUC makes it add a partial aggregate path from create_upper_paths_hook, > and the test checks that the planner gathers it and builds Finalize > Aggregate on top. It fails without 0001. What does this test, other than the test module itself? The hook call in itself has no interesting behavior, and I don't think that we need to spin up a whole database session just to pass through that code line. In general, I think people have become far too enamored of tests for the sake of tests, and are not thinking about the downstream costs in CI and buildfarm cycles, developer time spent waiting for tests to run, and for that matter the nonzero ongoing maintenance effort that every test script has. Sure, those costs are tiny on a one-time basis, but they add up fast. It's a good idea to write something like this to convince yourself that the hook is usable for something useful, but that doesn't mean we need to carry that proof in-tree forevermore. regards, tom lane