From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | akp geek <akpgeek(at)gmail(dot)com> |
Cc: | Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>, Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: FSM and VM file |
Date: | 2010-03-08 09:54:52 |
Message-ID: | 4B94C96C.1020907@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 05/03/10 15:14, akp geek wrote:
> Hi All -
>
> I have turned on the auto vacuum on the slave and for some
> reason the db is getting bloated up. The master size is only 1G and the
> slave is at 9.2GB now. I did cluster on couple of tables also. did any one
> run into this situation? Can you please help?
OK - so autovacuum is now running on the slave, but your database keeps
growing anyway.
So - either:
1. You have a long-running transaction blocking the vacuum.
2. Your autovacuum isn't running often enough.
The first step with #1 is to check for idle transactions. Look in the
system view: pg_stat_activity
SELECT * FROM pg_stat_activity;
Is there anything there that started a long time ago (probably marked
IDLE IN TRANSACTION)?
For #2, I would start with seeing what tables are affected, then check
your configuration settings. It might be that autovacuum_naptime is too
large for your workload, or (auto)vacuum_cost_delay is too high.
http://www.postgresql.org/docs/8.4/static/routine-vacuuming.html#AUTOVACUUM
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2010-03-08 10:03:58 | Re: Foreign key behavior different in a function and outside |
Previous Message | chaoyong wang | 2010-03-08 09:01:47 | 2 questions to ask |