Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaca127c

Browse files
committed
Prevent Parallel Hash Join for JOIN_UNIQUE_INNER.
WHERE EXISTS (...) queries cannot be executed by Parallel Hash Joinwith jointype JOIN_UNIQUE_INNER, because there is no way to make apartial plan totally unique. The consequence of allowing such planswas duplicate results from some EXISTS queries.Back-patch to 11. Bug #15857.Author: Thomas MunroReviewed-by: Tom LaneReported-by: Vladimir KriukovDiscussion:https://postgr.es/m/15857-d1ba2a64bce0795e%40postgresql.org
1 parent0ab7110 commitaca127c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/optimizer/path/joinpath.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,9 +1867,12 @@ hash_inner_and_outer(PlannerInfo *root,
18671867

18681868
/*
18691869
* Can we use a partial inner plan too, so that we can build a
1870-
* shared hash table in parallel?
1870+
* shared hash table in parallel? We can't handle
1871+
* JOIN_UNIQUE_INNER because we can't guarantee uniqueness.
18711872
*/
1872-
if (innerrel->partial_pathlist!=NIL&&enable_parallel_hash)
1873+
if (innerrel->partial_pathlist!=NIL&&
1874+
save_jointype!=JOIN_UNIQUE_INNER&&
1875+
enable_parallel_hash)
18731876
{
18741877
cheapest_partial_inner=
18751878
(Path*)linitial(innerrel->partial_pathlist);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp