Skip site navigation (1) Skip section navigation (2)


From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: New VACUUM FULL
Date: 2009-10-27 04:55:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Here is a patch to support "rewrite" version of VACUUM FULL.
It was called "VACUUM REWRITE" in the past disucussin,
but I choose the following syntax for now:

    VACUUM ( FULL [ INPLACE | REPLACE ] )  [ table_name ]

The reason is to contrast the new REPLACE behavior with the old INPLACE
behavior. I cannot find any good terms of opposite meaning of REWRITE.

The new version works like as CLUSTER USING ctid or rewriting in
ALTER TABLE. It must be faster than them if we have many dead tuples
and are not interested in physical order of tuples.

We still need traditional VACUUM FULL behavior for system catalog because
we cannot change relfilenode for them. Also, VACUUM FULL REPLACE is not
always better than traditional VACUUM FULL; the new version requires
additional disk space and might be slower if we have a few dead tuples.

"VACUUM FULL" and "VACUUM (FULL)" are synonyms for "VACUUM (FULL REPLACE)",
but if the target table is s system catalog, instead "FULL INPLACE" is
used automatically.

If this approach is reasonable, I'll go for other supplemental parts.
(documentations, vacuumdb, etc.)

ITAGAKI Takahiro
NTT Open Source Software Center

Attachment: vacuum-full_20091027.patch
Description: application/octet-stream (42.3 KB)

In response to


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2009-10-27 06:43:39
Subject: Re: Unicode UTF-8 table formatting for psql text output
Previous:From: Greg SmithDate: 2009-10-27 04:38:27
Subject: Re: Parsing config files in a directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group