summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-02-11 23:31:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-02-11 23:31:34 +0000
commitfd267c1ebc363ae6b1bf586794fa5cc9e8cca43c (patch)
tree13c387759e392e99689d2a37a55db6a84f139bf5 /src/include
parenta02f6ce33b593039213a8987ba651f121b64464c (diff)
downloadpostgresql-fd267c1ebc363ae6b1bf586794fa5cc9e8cca43c.tar.gz
Skip ambulkdelete scan if there's nothing to delete and the index is not
partial. None of the existing AMs do anything useful except counting tuples when there's nothing to delete, and we can get a tuple count from the heap as long as it's not a partial index. (hash actually can skip anyway because it maintains a tuple count in the index metapage.) GIST is not currently able to exploit this optimization because, due to failure to index NULLs, GIST is always effectively partial. Possibly we should fix that sometime. Simon Riggs w/ some review by Tom Lane.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/genam.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index 859c4e53b2..eace51db0e 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.56 2006/02/11 17:14:09 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.57 2006/02/11 23:31:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,6 +51,7 @@ typedef struct IndexVacuumCleanupInfo
{
bool vacuum_full; /* VACUUM FULL (we have exclusive lock) */
int message_level; /* ereport level for progress messages */
+ double num_heap_tuples; /* tuples remaining in heap */
} IndexVacuumCleanupInfo;
/* Struct for heap-or-index scans of system tables */