Re: Vacuum related question - Mailing list pgsql-general

From Tom Lane
Subject Re: Vacuum related question
Date
Msg-id 4715.1095523584@sss.pgh.pa.us
Whole thread Raw
In response to Vacuum related question  ("G. Thomas Yagel, Jr." <tyagel@yahoo.com>)
List pgsql-general
"G. Thomas Yagel, Jr." <tyagel@yahoo.com> writes:
> After 12 hours I stopped inserting recods and started a "vacuum verbose".
> The vacuuming has taken almost 2 hours now and is not even finished.  What I
> don't understand is why there is so much vacuuming to be done on some tables
> that are only being inserted into.  As an example, I have pasted the output
> from the vacuuming of the pg_largeobject table.

You may think you've only inserted, but this output says differently:

> INFO:  "pg_largeobject": found 18317486 removable, 21326336 nonremovable row
> versions in 2119638 pages

Those 18 million dead rows didn't appear out of nowhere; they could only
have come from deleting or updating large objects (BLOBs).

The reason for the multiple index-cleaning cycles is that vacuum_mem was
only high enough to remember about 1.4 million dead rows at a time.
You could have sped up the process by setting vacuum_mem higher.

            regards, tom lane

pgsql-general by date:

Previous
From: Tim Penhey
Date:
Subject: pg_restore peculiarities
Next
From: Christopher Browne
Date:
Subject: Re: Support on Enterprise Linux (newbie)