From: | "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Doubt w.r.t vacuum |
Date: | 2003-07-29 08:57:44 |
Message-ID: | 3F268460.15742.4C2C947@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 28 Jul 2003 at 9:56, Alvaro Herrera wrote:
> 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.
OK. So here is my interpretation,
Vacuum full reclaims the space that is spilled to disk due to insufficient
vacuumi analyze and/or inadequate FSM size.
So to keep your database free from fat, use adequate FSM and use a autovacuum
daemon..
Am I going overboard here?
Bye
Shridhar
--
system-independent, adj.: Works equally poorly on all systems.
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Jung | 2003-07-29 10:33:06 | concurrent writes |
Previous Message | Tom Lane | 2003-07-29 01:39:23 | Re: Feature request -- Log Database Name |