From bc8ac3ce40c692b9c11b35c04bb36ea42a7ad74d Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 3 Aug 2006 15:22:09 +0000
Subject: [PATCH] Add missing pgstat_count_index_scan(), per Andreas
 Seltenreich.

---
 src/backend/access/gin/ginscan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/backend/access/gin/ginscan.c b/src/backend/access/gin/ginscan.c
index af3b4e80af7..c15181b9dbc 100644
--- a/src/backend/access/gin/ginscan.c
+++ b/src/backend/access/gin/ginscan.c
@@ -8,13 +8,14 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *          $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.3 2006/07/14 14:52:16 momjian Exp $
+ *          $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.4 2006/08/03 15:22:09 tgl Exp $
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 #include "access/genam.h"
 #include "access/gin.h"
+#include "pgstat.h"
 #include "utils/memutils.h"
 
 
@@ -155,6 +156,8 @@ newScanKey( IndexScanDesc scan ) {
 
 	if ( so->nkeys == 0 )
 		elog(ERROR, "Gin doesn't support full scan due to it's awful inefficiency");
+
+	pgstat_count_index_scan(&scan->xs_pgstat_info);
 }
 
 Datum
-- 
GitLab