Re: "vacuum" and "cluster"

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: "vacuum" and "cluster"
Дата
Msg-id 480622D6.3000202@postnewspapers.com.au
обсуждение исходный текст
Ответ на "vacuum" and "cluster"  ("Jimmy Choi" <yhjchoi@gmail.com>)
Ответы Re: "vacuum" and "cluster"
Список pgsql-general
Jimmy Choi wrote:
> Hello,
>
> Does running "cluster" remove the need to run "vacuum"?

My understanding is that `CLUSTER' creates a new table file, then swaps
it out for the old one.

http://www.postgresql.org/docs/8.3/static/sql-cluster.html

" During the cluster operation, a temporary copy of the table is created
that contains the table data in the index order. Temporary copies of
each index on the table are created as well. Therefore, you need free
space on disk at least equal to the sum of the table size and the index
sizes. "

It's not stated explicitly, but I'm pretty sure discussion here has
mentioned that too. Given that, VACUUM FULL on a just-CLUSTERed table
should be redundant.

The easy way to be sure is to use ANALYZE VERBOSE to examine the dead
row counts etc before and after each operation.

--
Craig Ringer

В списке pgsql-general по дате отправления:

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Master-master replication with PostgreSQL
Следующее
От: "Vance Maverick"
Дата:
Сообщение: table as log (multiple writers and readers)