Re: Need to run CLUSTER to keep performance

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need to run CLUSTER to keep performance
Date: 2007-11-12 16:37:40
Message-ID: 20071112113740.d0e23686.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

In response to Heikki Linnakangas <heikki(at)enterprisedb(dot)com>:

> Rafael Martinez wrote:
> > DETAIL: 83623 dead row versions cannot be removed yet.
>
> Looks like you have a long-running transaction in the background, so
> VACUUM can't remove all dead tuples. I didn't see that in the vacuum
> verbose outputs you sent earlier. Is there any backends in "Idle in
> transaction" state, if you run ps?
>
> In 8.1, CLUSTER will remove those tuples anyway, but it's actually not
> correct. If the long-running transaction decides to do a select on
> hosts-table later on, it will see an empty table because of that. That's
> been fixed in 8.3, but it also means that CLUSTER might no longer help
> you on 8.3. VACUUM FULL is safe in that sense in 8.1 as well.

Considering how small the table is, you may want to just program the
process holding the transaction open to do a vacuum full of that table
when it's done with it's work.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-12 17:01:19 Re: Need to run CLUSTER to keep performance
Previous Message Tom Lane 2007-11-12 16:37:14 Re: difference between a unique constraint and a unique index ???