summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-22 06:17:03 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-22 06:17:03 +0000
commit94e03330cbd163378e43094388f87fcba4801ba8 (patch)
tree29fc477dae5e1be0c985db04ba2cc36389648ec6 /src/include
parent775d28302cda48b3f22a2f4f9067de0cf5192fff (diff)
downloadpostgresql-94e03330cbd163378e43094388f87fcba4801ba8.tar.gz
Create a routine PageIndexMultiDelete() that replaces a loop around
PageIndexTupleDelete() with a single pass of compactification --- logic mostly lifted from PageRepairFragmentation. I noticed while profiling that a VACUUM that's cleaning up a whole lot of deleted tuples would spend as much as a third of its CPU time in PageIndexTupleDelete; not too surprising considering the loop method was roughly O(N^2) in the number of tuples involved.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/bufpage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 71d043cd7f..8b195132cb 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.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/storage/bufpage.h,v 1.63 2004/12/31 22:03:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/bufpage.h,v 1.64 2005/03/22 06:17:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -323,5 +323,6 @@ extern void PageRestoreTempPage(Page tempPage, Page oldPage);
extern int PageRepairFragmentation(Page page, OffsetNumber *unused);
extern Size PageGetFreeSpace(Page page);
extern void PageIndexTupleDelete(Page page, OffsetNumber offset);
+extern void PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems);
#endif /* BUFPAGE_H */