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

Commit9d1ac2f

Browse files
committed
Tweak create_index_paths()'s test for whether to consider a bitmap scan.
Per my note of a couple days ago, create_index_paths would refuse toconsider any path at all for GIN indexes if the selectivity estimate cameout as 1.0; not even if you tried to force it with enable_seqscan. Whilethis isn't really a bad outcome in practice, it could be annoying fortesting purposes. Adjust the test for "is this path only useful forsorting" so that it doesn't fire on paths with nil pathkeys, which willinclude all GIN paths.
1 parent1c400d3 commit9d1ac2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ create_index_paths(PlannerInfo *root, RelOptInfo *rel)
196196
add_path(rel, (Path*)ipath);
197197

198198
if (ipath->indexinfo->amhasgetbitmap&&
199-
ipath->indexselectivity<1.0&&
200-
!ScanDirectionIsBackward(ipath->indexscandir))
199+
(ipath->path.pathkeys==NIL||
200+
ipath->indexselectivity<1.0))
201201
bitindexpaths=lappend(bitindexpaths,ipath);
202202
}
203203

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp