Re: Doubt w.r.t vacuum

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Doubt w.r.t vacuum
Дата
Msg-id 20030728135621.GA25619@dcc.uchile.cl
обсуждение исходный текст
Ответ на Doubt w.r.t vacuum  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Ответы Re: Doubt w.r.t vacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Doubt w.r.t vacuum  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Список pgsql-hackers
On Mon, Jul 28, 2003 at 02:29:36PM +0530, Shridhar Daithankar wrote:

> I was just wondering over it. This is for difference between vacuum full and 
> vacuum analyze. Can somebody enlighten,

Actually, the different concepts are "lazy vacuum" (plain VACUUM
command, with or without ANALYZE) and full vacuum ("VACUUM FULL"
command, with or without ANALYZE).

Lazy vacuum works one page at a time, so it doesn't need to lock the
entire table.  It is able to recover empty space from both updated and
deleted tuples -- in fact, they look the same to it.  All free space on
each page is defragmented.  Pages with free space are recorded in the
Free Space Map.  The FSM has limited space available, so only the pages
with the most free space will be recorded.

Vacuum full locks the entire table and moves tuples between pages.  It
leaves all pages full of tuples (except, obviously, the last one), so it
doesn't need to record them in the FSM.  Pages that are empty at the end
of the table are truncated.  This was the only version of VACUUM present
in releases previous to 7.2.

If I got something wrong, I'm sure someone will correct me.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Error code mixup?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Regression test failure date.