From 946cf229e89fda779161d707f3ba1f4d3cd024a1 Mon Sep 17 00:00:00 2001 From: Itagaki Takahiro Date: Wed, 6 Jan 2010 05:31:14 +0000 Subject: Support rewritten-based full vacuum as VACUUM FULL. Traditional VACUUM FULL was renamed to VACUUM FULL INPLACE. Also added a new option -i, --inplace for vacuumdb to perform FULL INPLACE vacuuming. Since the new VACUUM FULL uses CLUSTER infrastructure, we cannot use it for system tables. VACUUM FULL for system tables always fall back into VACUUM FULL INPLACE silently. Itagaki Takahiro, reviewed by Jeff Davis and Simon Riggs. --- doc/src/sgml/ref/vacuum.sgml | 25 +++++++++++++++++++++++-- doc/src/sgml/ref/vacuumdb.sgml | 14 +++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index 3b5d241703d..07559e38c42 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -1,5 +1,5 @@ @@ -21,7 +21,7 @@ PostgreSQL documentation -VACUUM [ ( { FULL | FREEZE | VERBOSE | ANALYZE } [, ...] ) ] [ table [ (column [, ...] ) ] ] +VACUUM [ ( { FULL [ INPLACE ] | FREEZE | VERBOSE | ANALYZE } [, ...] ) ] [ table [ (column [, ...] ) ] ] VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ table ] VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ table [ (column [, ...] ) ] ] @@ -86,6 +86,27 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ Selects full vacuum, which can reclaim more space, but takes much longer and exclusively locks the table. + + For user tables, all table data and indexes are rewritten. This + method requires extra disk space in which to write the new data, + and is generally useful when a significant amount of space needs + to be reclaimed from within the table. + + + For system tables, all table data and indexes are modified in + place to reclaim space. This method may require less disk space + for the table data than VACUUM FULL on a + comparable user table, but the indexes will grow which may + counteract that benefit. Additionally, the operation is often + slower than VACUUM FULL on a comparable user + table. + + + If FULL INPLACE is specified, the space is + reclaimed in the same manner as a system table, even if it is a + user table. Specifying INPLACE explicitly is + rarely useful. + diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index ad6f3a8cf3d..2d891c56cf6 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -1,5 +1,5 @@ @@ -24,6 +24,7 @@ PostgreSQL documentation vacuumdb connection-option --full-f + --inplace-i --freeze-F --verbose-v --analyze-z @@ -37,6 +38,7 @@ PostgreSQL documentation connection-options --all-a --full-f + --inplace-i --freeze-F --verbose-v --analyze-z @@ -129,6 +131,16 @@ PostgreSQL documentation + + + + + + Perform full inplace vacuuming. + + + + -- cgit v1.2.3