Re: apply_scanjoin_target_to_paths and partitionwise join
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>,
Andrei Lepikhov <lepihov@gmail.com>,
Jakub Wartak <jakub.wartak@enterprisedb.com>,
Tomas Vondra <tomas.vondra@enterprisedb.com>, arne.roland@malkut.net,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Julien Rouhaud <rjuju123@gmail.com>,
Etsuro Fujita <etsuro.fujita@gmail.com>,
Richard Guo <guofenglinux@gmail.com>
Date: 2025-01-02T20:58:24Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > I'm obviously missing something here, because I'm sure Jakub is quite > right when he says that this actually happened and actually hosed an > EDB customer. But I don't understand HOW it happened, and I think if > we're going to change the code we really ought to understand that and > write some code comments about it. In general, I think that it's very > reasonable to expect that a bunch of small joins will beat one big > join, which is why the code does what it currently does. I am wondering if the problem is not that the plan is slower, it's that for some reason the planner took a lot longer to create it. It's very plausible that partitionwise planning takes longer, and maybe we have some corner cases where the time is O(N^2) or worse. However, this is pure speculation without a test case, and any proposed fix would be even more speculative. I concur with your bottom line: we should insist on a public test case before deciding what to do about it. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove redundant SET enable_partitionwise_join = on.
- 3f33b63de278 19 (unreleased) landed
-
Don't reset the pathlist of partitioned joinrels.
- 014f9a831a32 19 (unreleased) landed
-
Allow left join removals and unique joins on partitioned tables
- 3c569049b7b5 16.0 cited
-
Consider fractional paths in generate_orderedappend_paths
- 6b94e7a6da2f 15.0 cited
-
Fix handling of targetlist SRFs when scan/join relation is known empty.
- 1d338584062b 12.0 cited