Re: DB is slow until DB is reloaded - Mailing list pgsql-performance

From Madison Kelly
Subject Re: DB is slow until DB is reloaded
Date
Msg-id 4B425E93.1050207@alteeve.com
Whole thread Raw
In response to Re: DB is slow until DB is reloaded  (Brad Nicholson <bnichols@ca.afilias.info>)
Responses Re: DB is slow until DB is reloaded  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-performance
Brad Nicholson wrote:
> I think you are going down the wrong route here - you should be looking
> at preventative maintenance instead of fixing it after its broken.
>
> Ensure that autovacuum is running for the database (assuming that you
> are on a relatively modern version of PG), and possibly tune it to be
> more aggressive (we can help).
>
> This will ensure that the condition never comes up.
>
> ps - if you do go with the route specify, no need to VACUUM after the
> CLUSTER.  CLUSTER gets rid of the dead tuples - nothing for VACUUM to
> do.
>

   I wanted to get ahead of the problem, hence my question here. :) I've
set this to run at night ('iwt' being the DB in question):

su postgres -c "psql iwt -c \"VACUUM ANALYZE VERBOSE\"

   I will keep an eye on the output for a little while (it appends to a
log) and see what it says. Also, I read that CLUSTER can mess up back
ups as it makes tables look empty while running. If the above doesn't
seem to help, I will swap out the VACUUM and run a CLUSTER before the
ANALYZE and see how that works.

Madi

pgsql-performance by date:

Previous
From: Madison Kelly
Date:
Subject: Re: DB is slow until DB is reloaded
Next
From: Steve Crawford
Date:
Subject: Re: DB is slow until DB is reloaded