diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 3af462b..04d6cec 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -543,15 +543,19 @@ btendscan(PG_FUNCTION_ARGS)
 	PG_RETURN_VOID();
 }
 
+
 /*
  *	btmarkpos() -- save current scan position
  */
+int hoge_markpos_count = 0;
+int hoge_restrpos_count = 0;
 Datum
 btmarkpos(PG_FUNCTION_ARGS)
 {
 	IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
 	BTScanOpaque so = (BTScanOpaque) scan->opaque;
 
+	hoge_markpos_count++;
 	/* we aren't holding any read locks, but gotta drop the pin */
 	if (BTScanPosIsValid(so->markPos))
 	{
@@ -585,7 +589,7 @@ btrestrpos(PG_FUNCTION_ARGS)
 {
 	IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
 	BTScanOpaque so = (BTScanOpaque) scan->opaque;
-
+	hoge_restrpos_count++;
 	/* Restore the marked positions of any array keys */
 	if (so->numArrayKeys)
 		_bt_restore_array_keys(scan);
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 33b172b..e7c1b99 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -258,14 +258,19 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
  *
  * ----------------------------------------------------------------
  */
+extern int hoge_markpos_count;
+extern int hoge_restrpos_count;
 void
 ExecutorRun(QueryDesc *queryDesc,
 			ScanDirection direction, long count)
 {
+	hoge_markpos_count = 0;
+	hoge_restrpos_count = 0;
 	if (ExecutorRun_hook)
 		(*ExecutorRun_hook) (queryDesc, direction, count);
 	else
 		standard_ExecutorRun(queryDesc, direction, count);
+	elog(LOG, "markpos=%d, restrpos=%d", hoge_markpos_count, hoge_restrpos_count);
 }
 
 void
