aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-02-13 05:35:11 +0000
committerBruce Momjian <bruce@momjian.us>2003-02-13 05:35:11 +0000
commit48ee6f4916c4b1104b66c03b33e427892a128a21 (patch)
tree3dae7198a49e583c7d155d6f69d4cd363fc32810 /src
parent0845b6f3265cc93e7700f98cb29e9a3a789aeed3 (diff)
downloadpostgresql-48ee6f4916c4b1104b66c03b33e427892a128a21.tar.gz
postgresql-48ee6f4916c4b1104b66c03b33e427892a128a21.zip
This trivial patch removes the usage of some old statistics code that no
longer works -- IncrHeapAccessStat() didn't actually *do* anything anymore, so no reason to keep it around AFAICS. I also fixed a grammatical error in a comment. Neil Conway
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/heapam.c84
-rw-r--r--src/backend/access/heap/hio.c8
-rw-r--r--src/backend/storage/buffer/bufmgr.c4
-rw-r--r--src/include/access/heapam.h9
4 files changed, 5 insertions, 100 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index e5e509f92ca..cb0c28c778a 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);
@@ -536,12 +524,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);
@@ -686,12 +662,6 @@ heap_beginscan(Relation relation, Snapshot snapshot,
HeapScanDesc scan;
/*
- * increment access statistics
- */
- IncrHeapAccessStat(local_beginscan);
- IncrHeapAccessStat(global_beginscan);
-
- /*
* sanity checks
*/
if (!RelationIsValid(relation))
@@ -744,12 +714,6 @@ heap_rescan(HeapScanDesc scan,
ScanKey key)
{
/*
- * increment access statistics
- */
- IncrHeapAccessStat(local_rescan);
- IncrHeapAccessStat(global_rescan);
-
- /*
* unpin scan buffers
*/
if (BufferIsValid(scan->rs_cbuf))
@@ -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 */
/*
@@ -917,12 +869,6 @@ heap_fetch(Relation relation,
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 67eb4ad7e24..53cf41c4449 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 6d1e52d5220..a1abaf22c13 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 61c95268087..bae635cc635 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
*