Re: VACUUM and transactions in different databases

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: c(at)cornelia-boenigk(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: VACUUM and transactions in different databases
Date: 2006-12-06 23:39:21
Message-ID: 20061206183921.de4a8bc6.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cornelia Boenigk <c(at)cornelia-boenigk(dot)de> wrote:
>
> Hi all
>
> If I have a running transaction in database1 and try to vacuum database2
> but the dead tuples in database2 cannot be removed.
>
> INFO: vacuuming "public.dummy1"
> INFO: "dummy1": found 0 removable, 140000 nonremovable row versions in
> 1341 pages
> DETAIL: 135000 dead row versions cannot be removed yet.
>
> How can I achieve that database2 is vacuumed while a transaction in
> database1 is not yet commited?

I don't believe that's the reason. AFAIK, activity in one database will
never block activity in another.

I would suspect that you haven't vacuumed this database in a long time,
and an ordinary vacuum can't reclaim that space. Can you run a "vacuum
full", and does it reclaim the space? If you do regular vacuum often
enough, you should never end up with so much unused space, unless your
usage pattern is very drastic, in which case you should look at other
methods of managing that table -- perhaps CLUSTER.

-Bill

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-12-06 23:55:21 Re: Trying to Understand Table Inheritance
Previous Message Jeff Davis 2006-12-06 23:28:01 Re: Trying to Understand Table Inheritance