diff -cpr pgsql-orig/src/backend/access/gist/gistget.c pgsql/src/backend/access/gist/gistget.c
*** pgsql-orig/src/backend/access/gist/gistget.c	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/backend/access/gist/gistget.c	2006-02-10 18:38:23.000000000 +0900
*************** gistgettuple(PG_FUNCTION_ARGS)
*** 115,121 ****
  	 * tuples, continue looping until we find a non-killed tuple that matches
  	 * the search key.
  	 */
! 	res = (gistnext(scan, dir, &tid, 1, scan->ignore_killed_tuples)) ? true : false;
  
  	PG_RETURN_BOOL(res);
  }
--- 115,121 ----
  	 * tuples, continue looping until we find a non-killed tuple that matches
  	 * the search key.
  	 */
! 	res = (gistnext(scan, dir, &tid, 1, true)) ? true : false;
  
  	PG_RETURN_BOOL(res);
  }
diff -cpr pgsql-orig/src/backend/access/hash/hash.c pgsql/src/backend/access/hash/hash.c
*** pgsql-orig/src/backend/access/hash/hash.c	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/backend/access/hash/hash.c	2006-02-10 18:38:09.000000000 +0900
*************** hashgettuple(PG_FUNCTION_ARGS)
*** 214,231 ****
  		res = _hash_first(scan, dir);
  
  	/*
! 	 * Skip killed tuples if asked to.
  	 */
! 	if (scan->ignore_killed_tuples)
  	{
! 		while (res)
! 		{
! 			offnum = ItemPointerGetOffsetNumber(&(scan->currentItemData));
! 			page = BufferGetPage(so->hashso_curbuf);
! 			if (!ItemIdDeleted(PageGetItemId(page, offnum)))
! 				break;
! 			res = _hash_next(scan, dir);
! 		}
  	}
  
  	/* Release read lock on current buffer, but keep it pinned */
--- 214,228 ----
  		res = _hash_first(scan, dir);
  
  	/*
! 	 * Skip killed tuples.
  	 */
! 	while (res)
  	{
! 		offnum = ItemPointerGetOffsetNumber(&(scan->currentItemData));
! 		page = BufferGetPage(so->hashso_curbuf);
! 		if (!ItemIdDeleted(PageGetItemId(page, offnum)))
! 			break;
! 		res = _hash_next(scan, dir);
  	}
  
  	/* Release read lock on current buffer, but keep it pinned */
*************** hashgetmulti(PG_FUNCTION_ARGS)
*** 273,293 ****
  			res = _hash_first(scan, ForwardScanDirection);
  
  		/*
! 		 * Skip killed tuples if asked to.
  		 */
! 		if (scan->ignore_killed_tuples)
  		{
! 			while (res)
! 			{
! 				Page		page;
! 				OffsetNumber offnum;
  
! 				offnum = ItemPointerGetOffsetNumber(&(scan->currentItemData));
! 				page = BufferGetPage(so->hashso_curbuf);
! 				if (!ItemIdDeleted(PageGetItemId(page, offnum)))
! 					break;
! 				res = _hash_next(scan, ForwardScanDirection);
! 			}
  		}
  
  		if (!res)
--- 270,287 ----
  			res = _hash_first(scan, ForwardScanDirection);
  
  		/*
! 		 * Skip killed tuples.
  		 */
! 		while (res)
  		{
! 			Page		page;
! 			OffsetNumber offnum;
  
! 			offnum = ItemPointerGetOffsetNumber(&(scan->currentItemData));
! 			page = BufferGetPage(so->hashso_curbuf);
! 			if (!ItemIdDeleted(PageGetItemId(page, offnum)))
! 				break;
! 			res = _hash_next(scan, ForwardScanDirection);
  		}
  
  		if (!res)
diff -cpr pgsql-orig/src/backend/access/index/genam.c pgsql/src/backend/access/index/genam.c
*** pgsql-orig/src/backend/access/index/genam.c	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/backend/access/index/genam.c	2006-02-10 18:38:09.000000000 +0900
*************** RelationGetIndexScan(Relation indexRelat
*** 89,95 ****
  	scan->is_multiscan = false;			/* caller may change this */
  	scan->have_lock = false;			/* ditto */
  	scan->kill_prior_tuple = false;
- 	scan->ignore_killed_tuples = true;	/* default setting */
  	scan->keys_are_unique = false;		/* may be set by index AM */
  	scan->got_tuple = false;
  
--- 89,94 ----
diff -cpr pgsql-orig/src/backend/access/index/indexam.c pgsql/src/backend/access/index/indexam.c
*** pgsql-orig/src/backend/access/index/indexam.c	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/backend/access/index/indexam.c	2006-02-10 18:38:09.000000000 +0900
*************** index_getnext(IndexScanDesc scan, ScanDi
*** 604,612 ****
   *
   * Finds the next index tuple satisfying the scan keys.  Note that the
   * corresponding heap tuple is not accessed, and thus no time qual (snapshot)
!  * check is done, other than the index AM's internal check for killed tuples
!  * (which most callers of this routine will probably want to suppress by
!  * setting scan->ignore_killed_tuples = false).
   *
   * On success (TRUE return), the found index TID is in scan->currentItemData,
   * and its heap TID is in scan->xs_ctup.t_self.  scan->xs_cbuf is untouched.
--- 604,610 ----
   *
   * Finds the next index tuple satisfying the scan keys.  Note that the
   * corresponding heap tuple is not accessed, and thus no time qual (snapshot)
!  * check is done, other than the index AM's internal check for killed tuples.
   *
   * On success (TRUE return), the found index TID is in scan->currentItemData,
   * and its heap TID is in scan->xs_ctup.t_self.  scan->xs_cbuf is untouched.
diff -cpr pgsql-orig/src/backend/access/nbtree/nbtutils.c pgsql/src/backend/access/nbtree/nbtutils.c
*** pgsql-orig/src/backend/access/nbtree/nbtutils.c	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/backend/access/nbtree/nbtutils.c	2006-02-10 18:38:09.000000000 +0900
*************** _bt_checkkeys(IndexScanDesc scan,
*** 582,588 ****
  	 * However, if this is the last tuple on the page, we should check
  	 * the index keys to prevent uselessly advancing to the next page.
  	 */
! 	if (scan->ignore_killed_tuples && ItemIdDeleted(iid))
  	{
  		/* return immediately if there are more tuples on the page */
  		if (ScanDirectionIsForward(dir))
--- 582,588 ----
  	 * However, if this is the last tuple on the page, we should check
  	 * the index keys to prevent uselessly advancing to the next page.
  	 */
! 	if (ItemIdDeleted(iid))
  	{
  		/* return immediately if there are more tuples on the page */
  		if (ScanDirectionIsForward(dir))
diff -cpr pgsql-orig/src/include/access/relscan.h pgsql/src/include/access/relscan.h
*** pgsql-orig/src/include/access/relscan.h	2006-02-10 18:18:10.000000000 +0900
--- pgsql/src/include/access/relscan.h	2006-02-10 18:38:09.000000000 +0900
*************** typedef struct IndexScanDescData
*** 65,71 ****
  
  	/* signaling to index AM about killing index tuples */
  	bool		kill_prior_tuple;		/* last-returned tuple is dead */
- 	bool		ignore_killed_tuples;	/* do not return killed entries */
  
  	/* set by index AM if scan keys satisfy index's uniqueness constraint */
  	bool		keys_are_unique;
--- 65,70 ----