summaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-05-24 18:57:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-05-24 18:57:57 +0000
commit3f4d48802271126b1343289a9d2267ff1ed3788a (patch)
treeb8c7507719ba240834e28cfbb56e2badff118b7e /src/backend/commands/analyze.c
parent2f2d05763d1c55c7998c0d7030659e3db6f60183 (diff)
downloadpostgresql-3f4d48802271126b1343289a9d2267ff1ed3788a.tar.gz
Mark index entries "killed" when they are no longer visible to any
transaction, so as to avoid returning them out of the index AM. Saves repeated heap_fetch operations on frequently-updated rows. Also detect queries on unique keys (equality to all columns of a unique index), and don't bother continuing scan once we have found first match. Killing is implemented in the btree and hash AMs, but not yet in rtree or gist, because there isn't an equally convenient place to do it in those AMs (the outer amgetnext routine can't do it without re-pinning the index page). Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and index_insert to make this a little easier.
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r--src/backend/commands/analyze.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 3f5cc96f41..5785139a51 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.34 2002/05/21 22:05:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.35 2002/05/24 18:57:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -655,8 +655,8 @@ pageloop:;
goto pageloop;
}
ItemPointerSet(&targtuple.t_self, targblock, targoffset);
- heap_fetch(onerel, SnapshotNow, &targtuple, &tupbuffer, NULL);
- if (targtuple.t_data != NULL)
+ if (heap_fetch(onerel, SnapshotNow, &targtuple, &tupbuffer,
+ false, NULL))
{
/*
* Found a suitable tuple, so save it, replacing one old