diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index e5e509f92ca8d6adb4d7d53829603dfdc7f02ba0..cb0c28c778aa8a88b80ea6f35039591529e29c09 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.149 2002/09/26 22:46:29 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.150 2003/02/13 05:35:07 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -124,12 +124,6 @@ heapgettup(Relation relation,
 	int			linesleft;
 	ItemPointer tid;
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_heapgettup);
-	IncrHeapAccessStat(global_heapgettup);
-
 	tid = (tuple->t_data == NULL) ? (ItemPointer) NULL : &(tuple->t_self);
 
 	/*
@@ -461,12 +455,6 @@ relation_open(Oid relationId, LOCKMODE lockmode)
 
 	Assert(lockmode >= NoLock && lockmode < MAX_LOCKMODES);
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_open);
-	IncrHeapAccessStat(global_open);
-
 	/* The relcache does all the real work... */
 	r = RelationIdGetRelation(relationId);
 
@@ -535,12 +523,6 @@ relation_openr(const char *sysRelationName, LOCKMODE lockmode)
 
 	Assert(lockmode >= NoLock && lockmode < MAX_LOCKMODES);
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_openr);
-	IncrHeapAccessStat(global_openr);
-
 	/*
 	 * We assume we should not need to worry about the rel's OID changing,
 	 * hence no need for AcceptInvalidationMessages here.
@@ -572,12 +554,6 @@ relation_close(Relation relation, LOCKMODE lockmode)
 {
 	Assert(lockmode >= NoLock && lockmode < MAX_LOCKMODES);
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_close);
-	IncrHeapAccessStat(global_close);
-
 	if (lockmode != NoLock)
 		UnlockRelation(relation, lockmode);
 
@@ -685,12 +661,6 @@ heap_beginscan(Relation relation, Snapshot snapshot,
 {
 	HeapScanDesc scan;
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_beginscan);
-	IncrHeapAccessStat(global_beginscan);
-
 	/*
 	 * sanity checks
 	 */
@@ -743,12 +713,6 @@ void
 heap_rescan(HeapScanDesc scan,
 			ScanKey key)
 {
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_rescan);
-	IncrHeapAccessStat(global_rescan);
-
 	/*
 	 * unpin scan buffers
 	 */
@@ -773,12 +737,6 @@ heap_rescan(HeapScanDesc scan,
 void
 heap_endscan(HeapScanDesc scan)
 {
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_endscan);
-	IncrHeapAccessStat(global_endscan);
-
 	/* Note: no locking manipulations needed */
 
 	/*
@@ -827,12 +785,6 @@ heap_endscan(HeapScanDesc scan)
 HeapTuple
 heap_getnext(HeapScanDesc scan, ScanDirection direction)
 {
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_getnext);
-	IncrHeapAccessStat(global_getnext);
-
 	/* Note: no locking manipulations needed */
 
 	/*
@@ -916,12 +868,6 @@ heap_fetch(Relation relation,
 	OffsetNumber offnum;
 	bool		valid;
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_fetch);
-	IncrHeapAccessStat(global_fetch);
-
 	/*
 	 * get the buffer from the relation descriptor. Note that this does a
 	 * buffer pin.
@@ -1110,10 +1056,6 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid)
 {
 	Buffer		buffer;
 
-	/* increment access statistics */
-	IncrHeapAccessStat(local_insert);
-	IncrHeapAccessStat(global_insert);
-
 	if (relation->rd_rel->relhasoids)
 	{
 #ifdef NOT_USED
@@ -1272,10 +1214,6 @@ heap_delete(Relation relation, ItemPointer tid,
 	Buffer		buffer;
 	int			result;
 
-	/* increment access statistics */
-	IncrHeapAccessStat(local_delete);
-	IncrHeapAccessStat(global_delete);
-
 	Assert(ItemPointerIsValid(tid));
 
 	buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(tid));
@@ -1471,10 +1409,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
 				pagefree;
 	int			result;
 
-	/* increment access statistics */
-	IncrHeapAccessStat(local_replace);
-	IncrHeapAccessStat(global_replace);
-
 	Assert(ItemPointerIsValid(otid));
 
 	buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(otid));
@@ -1796,10 +1730,6 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer,
 	PageHeader	dp;
 	int			result;
 
-	/* increment access statistics */
-	IncrHeapAccessStat(local_mark4update);
-	IncrHeapAccessStat(global_mark4update);
-
 	*buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(tid));
 
 	if (!BufferIsValid(*buffer))
@@ -1901,12 +1831,6 @@ l3:
 void
 heap_markpos(HeapScanDesc scan)
 {
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_markpos);
-	IncrHeapAccessStat(global_markpos);
-
 	/* Note: no locking manipulations needed */
 
 	if (scan->rs_ctup.t_data != NULL)
@@ -1935,12 +1859,6 @@ heap_markpos(HeapScanDesc scan)
 void
 heap_restrpos(HeapScanDesc scan)
 {
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_restrpos);
-	IncrHeapAccessStat(global_restrpos);
-
 	/* XXX no amrestrpos checking that ammarkpos called */
 
 	/* Note: no locking manipulations needed */
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 67eb4ad7e244ba2055033ee7f1aae10c6845b93d..53cf41c444910df60e39c65b7e324100161f05ee 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Id: hio.c,v 1.46 2002/08/06 02:36:33 tgl Exp $
+ *	  $Id: hio.c,v 1.47 2003/02/13 05:35:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,12 +37,6 @@ RelationPutHeapTuple(Relation relation,
 	ItemId		itemId;
 	Item		item;
 
-	/*
-	 * increment access statistics
-	 */
-	IncrHeapAccessStat(local_RelationPutHeapTuple);
-	IncrHeapAccessStat(global_RelationPutHeapTuple);
-
 	/* Add the tuple to the page */
 	pageHeader = BufferGetPage(buffer);
 
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 6d1e52d5220043d27376d17bb3a6d9174f1cbc84..a1abaf22c138cf0ab8c6218d7479bd867e3e65b5 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.133 2002/09/14 19:59:20 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.134 2003/02/13 05:35:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -424,7 +424,7 @@ BufferAlloc(Relation reln,
 			{
 				/*
 				 * BM_JUST_DIRTIED cleared by BufferReplace and shouldn't
-				 * be setted by anyone.		- vadim 01/17/97
+				 * be set by anyone.		- vadim 01/17/97
 				 */
 				if (buf->flags & BM_JUST_DIRTIED)
 				{
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 61c95268087104165face6dfef898e44ae8e6e65..bae635cc635568fb61544c486c6fc7757ebe39af 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.79 2002/09/04 20:31:36 momjian Exp $
+ * $Id: heapam.h,v 1.80 2003/02/13 05:35:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -25,13 +25,6 @@
 #include "utils/rel.h"
 #include "utils/tqual.h"
 
-/* ----------------------------------------------------------------
- *				leftover cruft from old statistics code
- * ----------------------------------------------------------------
- */
-
-#define IncrHeapAccessStat(x)	((void) 0)
-
 /* ----------------
  *		fastgetattr
  *