*** src/backend/optimizer/plan/createplan.c
--- src/backend/optimizer/plan/createplan.c
***************
*** 1197,1202 **** create_bitmap_subplan(PlannerInfo *root, Path *bitmapqual,
--- 1197,1203 ----
  		IndexPath  *ipath = (IndexPath *) bitmapqual;
  		IndexScan  *iscan;
  		ListCell   *l;
+ 		List	   *scan_clauses;
  
  		/* Use the regular indexscan plan build machinery... */
  		iscan = create_indexscan_plan(root, ipath, NIL, NIL);
***************
*** 1210,1216 **** create_bitmap_subplan(PlannerInfo *root, Path *bitmapqual,
  		plan->plan_rows =
  			clamp_row_est(ipath->indexselectivity * ipath->path.parent->tuples);
  		plan->plan_width = 0;	/* meaningless */
! 		*qual = get_actual_clauses(ipath->indexclauses);
  		foreach(l, ipath->indexinfo->indpred)
  		{
  			Expr	   *pred = (Expr *) lfirst(l);
--- 1211,1233 ----
  		plan->plan_rows =
  			clamp_row_est(ipath->indexselectivity * ipath->path.parent->tuples);
  		plan->plan_width = 0;	/* meaningless */
! 
! 		/*
! 		 * Put those indexquals that are automatically handled by the index to
! 		 * the Recheck condition. Don't include clauses that are derived from,
! 		 * but not directly included in the original scan quals. The original
! 		 * clause they're derived from need to be checked anyway in the Filter,
! 		 * even for non-lossy bitmaps.
! 		 */
! 		scan_clauses = get_actual_clauses(ipath->indexclauses);
! 		*qual = NIL;
! 		foreach(l, iscan->indexqualorig)
! 		{
! 			Expr	   *q = (Expr *) lfirst(l);
! 			if (list_member(scan_clauses, q))
! 				*qual = lappend(*qual, q);
! 		}
! 
  		foreach(l, ipath->indexinfo->indpred)
  		{
  			Expr	   *pred = (Expr *) lfirst(l);
