Thread: VACUUM output

VACUUM output

From
Dmitry Tkach
Date:
Hi, everybody!

I was wonderring if someone could please explain to me how to read the
output of a VACUUM command?
For example:

NOTICE:  --Relation dnbarchive--
NOTICE:  Index history_idx: Pages 682674; Tuples 147407062: Deleted 7034.
        CPU 190.55s/164.38u sec elapsed 5913.35 sec.
NOTICE:  Removed 7035 tuples in 110 pages.
        CPU 0.02s/0.08u sec elapsed 2.29 sec.
NOTICE:  Pages 1180651: Changed 46177, Empty 0; Tup 147339618: Vac 7035,
Keep 0, UnUsed 16938612.
        Total CPU 549.83s/218.90u sec elapsed 13697.71 sec.

What is the meaning of these statistics? Partciularly, "Vac", "Removed"
and "UnUsed"?
In this case, do I interpret it correctly, that I have over 16 million
unused tuples, and only about 7K of those were taken care of by vacuum?
If so, what do I need to do to fix that?
Is increasing free space map going to help?
If so, will it make the vaccum run even longer? (I started it yesterday
about 6 pm, and it is still going - looks like not even half way
through)....

Thanks a lot!

Dima



Re: VACUUM output

From
Tom Lane
Date:
Dmitry Tkach <dmitry@openratings.com> writes:
> I was wonderring if someone could please explain to me how to read the
> output of a VACUUM command?
> ...
> What is the meaning of these statistics? Partciularly, "Vac", "Removed"
> and "UnUsed"?

I believe "Vac" and "Removed" are the same thing, viz the number of dead
tuples removed in the current VACUUM cycle.  They're measured in
different places though, so I'd not care to swear on a stack of bibles
that they could never be different.  "UnUsed" is the number of unused
tuple pointers (line pointers) present in the table, ie, line pointers
that used to point to tuples that've been recycled.  At 4 bytes apiece
you don't need to panic about those; they'll get reused eventually,
and even if they don't they're not costing much.

            regards, tom lane