Re: VACUUM and transactions in different databases - Mailing list pgsql-general

From Bill Moran
Subject Re: VACUUM and transactions in different databases
Date
Msg-id 20061206183921.de4a8bc6.wmoran@collaborativefusion.com
Whole thread Raw
In response to VACUUM and transactions in different databases  (Cornelia Boenigk <c@cornelia-boenigk.de>)
Responses Re: VACUUM and transactions in different databases  (Cornelia Boenigk <c@cornelia-boenigk.de>)
Re: VACUUM and transactions in different databases  (Cornelia Boenigk <c@cornelia-boenigk.de>)
List pgsql-general
Cornelia Boenigk <c@cornelia-boenigk.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

pgsql-general by date:

Previous
From: Cornelia Boenigk
Date:
Subject: VACUUM and transactions in different databases
Next
From: Richard Broersma Jr
Date:
Subject: Re: Trying to Understand Table Inheritance