aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/optimizer/path/indxpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index ab3d8d00b75..a3101d7ea73 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -196,8 +196,8 @@ create_index_paths(PlannerInfo *root, RelOptInfo *rel)
add_path(rel, (Path *) ipath);
if (ipath->indexinfo->amhasgetbitmap &&
- ipath->indexselectivity < 1.0 &&
- !ScanDirectionIsBackward(ipath->indexscandir))
+ (ipath->path.pathkeys == NIL ||
+ ipath->indexselectivity < 1.0))
bitindexpaths = lappend(bitindexpaths, ipath);
}