Need to vacuum twice for effectiveness? - Mailing list pgsql-general

From Lincoln Yeoh
Subject Need to vacuum twice for effectiveness?
Date
Msg-id 3.0.5.32.20011212154604.01070440@192.228.128.13
Whole thread Raw
In response to Re: idle in transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

<history>
Sometime back my app had some probs with postgres 7.1.2- the app did a lot
of updates, and somehow after weeks the backend exited when I did a select
on a table.

I truncated the table and updated to 7.1.3 (did not pg_dump).

I'm trying to see if the problem recurs in 7.1.3.
</history>

Recently I vacummed the database (the postmasters were using a lot of cpu).
No vacuum analyze, just plain psql, vacuum.

The disk usage before vacuuming was 95MB.

After dropped to 45MB.

Then I noticed the postmaster for a particular table still using lots of
cpu 45-80%. Another postmaster on the same database, using different table
was using a lot less cpu.

I vacuumed again, this time the troublesome table specifically.

Then the disk usage dropped to 9MB. And the postmaster cpu usage went down.
I did not restart the app or postgres.

Is it normal to require two vacuums for it to be effective? AFAIK I was
connected to the correct database when vacuuming.

Should I have pg_dumped and reloaded?

Regards,
Link.


pgsql-general by date:

Previous
From: Philip Rhoades
Date:
Subject: Functions like: GetNextRecord . .
Next
From: Michael Meskes
Date:
Subject: Re: ecpg - select * into structure problem