Index: src/backend/access/heap/heapam.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/access/heap/heapam.c,v
retrieving revision 1.149
diff -c -r1.149 heapam.c
*** src/backend/access/heap/heapam.c	26 Sep 2002 22:46:29 -0000	1.149
--- src/backend/access/heap/heapam.c	26 Jan 2003 16:50:45 -0000
***************
*** 124,135 ****
  	int			linesleft;
  	ItemPointer tid;
  
- 	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_heapgettup);
- 	IncrHeapAccessStat(global_heapgettup);
- 
  	tid = (tuple->t_data == NULL) ? (ItemPointer) NULL : &(tuple->t_self);
  
  	/*
--- 124,129 ----
***************
*** 461,472 ****
  
  	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);
  
--- 455,460 ----
***************
*** 536,547 ****
  	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.
  	 */
--- 524,529 ----
***************
*** 572,583 ****
  {
  	Assert(lockmode >= NoLock && lockmode < MAX_LOCKMODES);
  
- 	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_close);
- 	IncrHeapAccessStat(global_close);
- 
  	if (lockmode != NoLock)
  		UnlockRelation(relation, lockmode);
  
--- 554,559 ----
***************
*** 686,697 ****
  	HeapScanDesc scan;
  
  	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_beginscan);
- 	IncrHeapAccessStat(global_beginscan);
- 
- 	/*
  	 * sanity checks
  	 */
  	if (!RelationIsValid(relation))
--- 662,667 ----
***************
*** 744,755 ****
  			ScanKey key)
  {
  	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_rescan);
- 	IncrHeapAccessStat(global_rescan);
- 
- 	/*
  	 * unpin scan buffers
  	 */
  	if (BufferIsValid(scan->rs_cbuf))
--- 714,719 ----
***************
*** 773,784 ****
  void
  heap_endscan(HeapScanDesc scan)
  {
- 	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_endscan);
- 	IncrHeapAccessStat(global_endscan);
- 
  	/* Note: no locking manipulations needed */
  
  	/*
--- 737,742 ----
***************
*** 827,838 ****
  HeapTuple
  heap_getnext(HeapScanDesc scan, ScanDirection direction)
  {
- 	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_getnext);
- 	IncrHeapAccessStat(global_getnext);
- 
  	/* Note: no locking manipulations needed */
  
  	/*
--- 785,790 ----
***************
*** 917,928 ****
  	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.
  	 */
--- 869,874 ----
***************
*** 1110,1119 ****
  {
  	Buffer		buffer;
  
- 	/* increment access statistics */
- 	IncrHeapAccessStat(local_insert);
- 	IncrHeapAccessStat(global_insert);
- 
  	if (relation->rd_rel->relhasoids)
  	{
  #ifdef NOT_USED
--- 1056,1061 ----
***************
*** 1272,1281 ****
  	Buffer		buffer;
  	int			result;
  
- 	/* increment access statistics */
- 	IncrHeapAccessStat(local_delete);
- 	IncrHeapAccessStat(global_delete);
- 
  	Assert(ItemPointerIsValid(tid));
  
  	buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(tid));
--- 1214,1219 ----
***************
*** 1471,1480 ****
  				pagefree;
  	int			result;
  
- 	/* increment access statistics */
- 	IncrHeapAccessStat(local_replace);
- 	IncrHeapAccessStat(global_replace);
- 
  	Assert(ItemPointerIsValid(otid));
  
  	buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(otid));
--- 1409,1414 ----
***************
*** 1796,1805 ****
  	PageHeader	dp;
  	int			result;
  
- 	/* increment access statistics */
- 	IncrHeapAccessStat(local_mark4update);
- 	IncrHeapAccessStat(global_mark4update);
- 
  	*buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(tid));
  
  	if (!BufferIsValid(*buffer))
--- 1730,1735 ----
***************
*** 1901,1912 ****
  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)
--- 1831,1836 ----
***************
*** 1935,1946 ****
  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 */
--- 1859,1864 ----
Index: src/backend/access/heap/hio.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/access/heap/hio.c,v
retrieving revision 1.46
diff -c -r1.46 hio.c
*** src/backend/access/heap/hio.c	6 Aug 2002 02:36:33 -0000	1.46
--- src/backend/access/heap/hio.c	26 Jan 2003 16:51:18 -0000
***************
*** 37,48 ****
  	ItemId		itemId;
  	Item		item;
  
- 	/*
- 	 * increment access statistics
- 	 */
- 	IncrHeapAccessStat(local_RelationPutHeapTuple);
- 	IncrHeapAccessStat(global_RelationPutHeapTuple);
- 
  	/* Add the tuple to the page */
  	pageHeader = BufferGetPage(buffer);
  
--- 37,42 ----
Index: src/backend/storage/buffer/bufmgr.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/storage/buffer/bufmgr.c,v
retrieving revision 1.133
diff -c -r1.133 bufmgr.c
*** src/backend/storage/buffer/bufmgr.c	14 Sep 2002 19:59:20 -0000	1.133
--- src/backend/storage/buffer/bufmgr.c	26 Jan 2003 17:00:44 -0000
***************
*** 424,430 ****
  			{
  				/*
  				 * BM_JUST_DIRTIED cleared by BufferReplace and shouldn't
! 				 * be setted by anyone.		- vadim 01/17/97
  				 */
  				if (buf->flags & BM_JUST_DIRTIED)
  				{
--- 424,430 ----
  			{
  				/*
  				 * BM_JUST_DIRTIED cleared by BufferReplace and shouldn't
! 				 * be set by anyone.		- vadim 01/17/97
  				 */
  				if (buf->flags & BM_JUST_DIRTIED)
  				{
Index: src/include/access/heapam.h
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/include/access/heapam.h,v
retrieving revision 1.79
diff -c -r1.79 heapam.h
*** src/include/access/heapam.h	4 Sep 2002 20:31:36 -0000	1.79
--- src/include/access/heapam.h	26 Jan 2003 16:47:08 -0000
***************
*** 25,37 ****
  #include "utils/rel.h"
  #include "utils/tqual.h"
  
- /* ----------------------------------------------------------------
-  *				leftover cruft from old statistics code
-  * ----------------------------------------------------------------
-  */
- 
- #define IncrHeapAccessStat(x)	((void) 0)
- 
  /* ----------------
   *		fastgetattr
   *
--- 25,30 ----
