aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-02-08 04:33:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-02-08 04:33:55 +0000
commit0a469c87692d15a22eaa69d4b3a43dd8e278dd64 (patch)
tree34353dece3a2a8da2c599562685831bdcb14080e /src/backend/access/gin
parent1ddc2703a936d03953657f43345460b9242bbed1 (diff)
downloadpostgresql-0a469c87692d15a22eaa69d4b3a43dd8e278dd64.tar.gz
postgresql-0a469c87692d15a22eaa69d4b3a43dd8e278dd64.zip
Remove old-style VACUUM FULL (which was known for a little while as
VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity. Per discussion, the use case for this method of vacuuming is no longer large enough to justify maintaining it; not to mention that we don't wish to invest the work that would be needed to make it play nicely with Hot Standby. Aside from the code directly related to old-style VACUUM FULL, this commit removes support for certain WAL record types that could only be generated within VACUUM FULL, redirect-pointer removal in heap_page_prune, and nontransactional generation of cache invalidation sinval messages (the last being the sticking point for Hot Standby). We still have to retain all code that copes with finding HEAP_MOVED_OFF and HEAP_MOVED_IN flag bits on existing tuples. This can't be removed as long as we want to support in-place update from pre-9.0 databases.
Diffstat (limited to 'src/backend/access/gin')
-rw-r--r--src/backend/access/gin/README9
-rw-r--r--src/backend/access/gin/ginvacuum.c19
2 files changed, 4 insertions, 24 deletions
diff --git a/src/backend/access/gin/README b/src/backend/access/gin/README
index af65efcb542..cd406935e05 100644
--- a/src/backend/access/gin/README
+++ b/src/backend/access/gin/README
@@ -1,4 +1,4 @@
-$PostgreSQL: pgsql/src/backend/access/gin/README,v 1.6 2008/07/08 03:25:42 neilc Exp $
+$PostgreSQL: pgsql/src/backend/access/gin/README,v 1.7 2010/02/08 04:33:52 tgl Exp $
Gin for PostgreSQL
==================
@@ -98,13 +98,6 @@ We appreciate any comments, help and suggestions.
* Teach optimizer/executor that GIN is intrinsically clustered. i.e., it
always returns ItemPointer in ascending order.
* Tweak gincostestimate.
- * GIN stores several ItemPointer to heap tuple, so VACUUM FULL produces
- this warning message:
-
- WARNING: index "idx" contains 88395 row versions, but table contains
- 51812 row versions
- HINT: Rebuild the index with REINDEX.
- **** Workaround added
TODO
----
diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c
index 014db7fb739..a13b99cdfac 100644
--- a/src/backend/access/gin/ginvacuum.c
+++ b/src/backend/access/gin/ginvacuum.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.32 2010/01/02 16:57:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.33 2010/02/08 04:33:52 tgl Exp $
*-------------------------------------------------------------------------
*/
@@ -745,13 +745,9 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
stats->estimated_count = info->estimated_count;
/*
- * If vacuum full, we already have exclusive lock on the index. Otherwise,
- * need lock unless it's local to this backend.
+ * Need lock unless it's local to this backend.
*/
- if (info->vacuum_full)
- needLock = false;
- else
- needLock = !RELATION_IS_LOCAL(index);
+ needLock = !RELATION_IS_LOCAL(index);
if (needLock)
LockRelationForExtension(index, ExclusiveLock);
@@ -785,15 +781,6 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
}
lastBlock = npages - 1;
- if (info->vacuum_full && lastBlock > lastFilledBlock)
- {
- /* try to truncate index */
- RelationTruncate(index, lastFilledBlock + 1);
-
- stats->pages_removed = lastBlock - lastFilledBlock;
- totFreePages = totFreePages - stats->pages_removed;
- }
-
/* Finally, vacuum the FSM */
IndexFreeSpaceMapVacuum(info->index);