Re: [Again] Postgres performance problem

From: Decibel! <decibel(at)decibel(dot)org>
To: Ruben Rubio <ruben(at)rentalia(dot)com>
Cc: db(at)zigo(dot)dhs(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [Again] Postgres performance problem
Date: 2007-09-11 22:52:42
Message-ID: 20070911225242.GG38801@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Sep 11, 2007 at 09:49:37AM +0200, Ruben Rubio wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> db(at)zigo(dot)dhs(dot)org escribi?:
> >> Last time I had this problem i solved it stopping website, restarting
> >> database, vacuumm it, run again website. But I guess this is going to
> >> happen again.
> >>
> >> I would like to detect and solve the problem. Any ideas to detect it?
> >
> > Do you have very long transactions? Maybe some client that is connected
> > all the time that is idle in transaction?
>
> There should not be long transactions. I ll keep an eye on Idle transactions
>
> I m detecting it using:
>
> echo 'SELECT current_query FROM pg_stat_activity;' |
> /usr/local/pgsql/bin/psql vacadb | grep IDLE | wc -l

If you're using VACUUM FULL, you're doing something wrong. :) Run lazy
vacuum frequently enough (better yet, autovacuum, but cut all of 8.1's
autovac parameters in half), and make sure your FSM is big enough
(periodic vacuumdb -av | tail is an easy way to check that).

Try a REINDEX. VACUUM FULL is especially hard on the indexes, and it's
easy for them to seriously bloat.
--
Decibel!, aka Jim Nasby decibel(at)decibel(dot)org
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Decibel! 2007-09-11 23:00:22 Re: Barcelona vs Tigerton
Previous Message Mark Mielke 2007-09-11 21:50:24 Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1