summaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-10-08 22:34:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-10-08 22:34:57 +0000
commitc970292a94e0fff468d500db430d751b6221a0b4 (patch)
treeea33271f6473aa4ceaf81ba3e7180253ea32f983 /src/backend/executor
parent474f825574db680ce638fce9b92254ff35fbc8fd (diff)
downloadpostgresql-c970292a94e0fff468d500db430d751b6221a0b4.tar.gz
Remove very ancient tuple-counting infrastructure (IncrRetrieved() and
friends). This code has all been ifdef'd out for many years, and doesn't seem to have any prospect of becoming any more useful in the future. EXPLAIN ANALYZE is what people use in practice, and I think if we did want process-wide counters we'd be more likely to put in dtrace events for that than try to resurrect this code. Get rid of it so as to have one less detail to worry about while refactoring execMain.c.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execMain.c8
-rw-r--r--src/backend/executor/execQual.c4
-rw-r--r--src/backend/executor/execUtils.c82
3 files changed, 3 insertions, 91 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 493ec2b1af..82b05dc4d1 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.330 2009/10/05 19:24:37 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.331 2009/10/08 22:34:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1704,7 +1704,6 @@ ExecSelect(TupleTableSlot *slot,
EState *estate)
{
(*dest->receiveSlot) (slot, dest);
- IncrRetrieved();
(estate->es_processed)++;
}
@@ -1800,7 +1799,6 @@ ExecInsert(TupleTableSlot *slot,
newId = heap_insert(resultRelationDesc, tuple,
estate->es_output_cid, 0, NULL);
- IncrAppended();
(estate->es_processed)++;
estate->es_lastoid = newId;
setLastTid(&(tuple->t_self));
@@ -1908,7 +1906,6 @@ ldelete:;
return;
}
- IncrDeleted();
(estate->es_processed)++;
/*
@@ -2089,7 +2086,6 @@ lreplace:;
return;
}
- IncrReplaced();
(estate->es_processed)++;
/*
@@ -3042,8 +3038,6 @@ intorel_receive(TupleTableSlot *slot, DestReceiver *self)
myState->bistate);
/* We know this is a newly created relation, so there are no indexes */
-
- IncrAppended();
}
/*
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index 4f94bab1c6..b9b67da26f 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.251 2009/08/06 20:44:31 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.252 2009/10/08 22:34:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4814,8 +4814,6 @@ ExecQual(List *qual, ExprContext *econtext, bool resultForNull)
EV_nodeDisplay(qual);
EV_printf("\n");
- IncrProcessed();
-
/*
* Run in short-lived per-tuple context while computing expressions.
*/
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index c20c76cbae..f28d8225f7 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.162 2009/09/27 20:09:57 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.163 2009/10/08 22:34:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,86 +53,11 @@
#include "utils/tqual.h"
-/* ----------------------------------------------------------------
- * global counters for number of tuples processed, retrieved,
- * appended, replaced, deleted.
- * ----------------------------------------------------------------
- */
-int NTupleProcessed;
-int NTupleRetrieved;
-int NTupleReplaced;
-int NTupleAppended;
-int NTupleDeleted;
-int NIndexTupleInserted;
-int NIndexTupleProcessed;
-
-
static bool get_last_attnums(Node *node, ProjectionInfo *projInfo);
static void ShutdownExprContext(ExprContext *econtext, bool isCommit);
/* ----------------------------------------------------------------
- * statistic functions
- * ----------------------------------------------------------------
- */
-
-/* ----------------------------------------------------------------
- * ResetTupleCount
- * ----------------------------------------------------------------
- */
-#ifdef NOT_USED
-void
-ResetTupleCount(void)
-{
- NTupleProcessed = 0;
- NTupleRetrieved = 0;
- NTupleAppended = 0;
- NTupleDeleted = 0;
- NTupleReplaced = 0;
- NIndexTupleProcessed = 0;
-}
-#endif
-
-/* ----------------------------------------------------------------
- * PrintTupleCount
- * ----------------------------------------------------------------
- */
-#ifdef NOT_USED
-void
-DisplayTupleCount(FILE *statfp)
-{
- if (NTupleProcessed > 0)
- fprintf(statfp, "!\t%d tuple%s processed, ", NTupleProcessed,
- (NTupleProcessed == 1) ? "" : "s");
- else
- {
- fprintf(statfp, "!\tno tuples processed.\n");
- return;
- }
- if (NIndexTupleProcessed > 0)
- fprintf(statfp, "%d indextuple%s processed, ", NIndexTupleProcessed,
- (NIndexTupleProcessed == 1) ? "" : "s");
- if (NIndexTupleInserted > 0)
- fprintf(statfp, "%d indextuple%s inserted, ", NIndexTupleInserted,
- (NIndexTupleInserted == 1) ? "" : "s");
- if (NTupleRetrieved > 0)
- fprintf(statfp, "%d tuple%s retrieved. ", NTupleRetrieved,
- (NTupleRetrieved == 1) ? "" : "s");
- if (NTupleAppended > 0)
- fprintf(statfp, "%d tuple%s appended. ", NTupleAppended,
- (NTupleAppended == 1) ? "" : "s");
- if (NTupleDeleted > 0)
- fprintf(statfp, "%d tuple%s deleted. ", NTupleDeleted,
- (NTupleDeleted == 1) ? "" : "s");
- if (NTupleReplaced > 0)
- fprintf(statfp, "%d tuple%s replaced. ", NTupleReplaced,
- (NTupleReplaced == 1) ? "" : "s");
- fprintf(statfp, "\n");
-}
-#endif
-
-
-/* ----------------------------------------------------------------
* Executor state and memory management functions
* ----------------------------------------------------------------
*/
@@ -1166,11 +1091,6 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
*/
result = lappend_oid(result, RelationGetRelid(indexRelation));
}
-
- /*
- * keep track of index inserts for debugging
- */
- IncrIndexInserted();
}
return result;