From: Tom Lane <tgl@sss.pgh.pa.us>
To: shihao zhong <zhong950419@gmail.com>
Cc: Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Andrew Dunstan <amdunstan@gmail.com>
Subject: Re: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
Date: Sun, 06 Sep 2026 20:48:47 -0400
Message-ID: <147106.1788742127@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGRkXqRZBMUKQXtKiVbHXWR9obG-pufE-i5a5jgcg44GhHezhA@mail.gmail.com>
References: <6fc72a7d-9f52-4a72-9adf-1912da255605@dunslane.net>
<246590be-70c4-4441-a0bc-56dc05be1318@dunslane.net>
<178842960036.1140.8272272790033693692.pgcf@coridan.postgresql.org>
<CAGRkXqRZBMUKQXtKiVbHXWR9obG-pufE-i5a5jgcg44GhHezhA@mail.gmail.com>
shihao zhong <zhong950419@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, zhong950419@gmail.com, upadhyaya.himanshu@gmail.com, amdunstan@gmail.com
Subject: Re: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
In-Reply-To: <147106.1788742127@sss.pgh.pa.us>
References: <6fc72a7d-9f52-4a72-9adf-1912da255605@dunslane.net> <246590be-70c4-4441-a0bc-56dc05be1318@dunslane.net> <178842960036.1140.8272272790033693692.pgcf@coridan.postgresql.org> <CAGRkXqRZBMUKQXtKiVbHXWR9obG-pufE-i5a5jgcg44GhHezhA@mail.gmail.com> <147106.1788742127@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox