From: | Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info> |
---|---|
To: | Eamonn Kent <ekent(at)xsigo(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Vacuum not identifying rows for removal.. |
Date: | 2006-08-21 19:25:04 |
Message-ID: | 1156188304.8772.6.camel@dba5.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Mon, 2006-08-21 at 11:50 -0700, Eamonn Kent wrote:
> So, my best guess is that something in our application is preventing
> vacuum from removing dead rows. What could cause this? Would it be
> caused by a long-living transaction? What is the best way to track
> the problem down...right now, I am looking through pg_stat_activity
> and pg_locks to find processes that are “in transaction” and what
> locks they are holding.
If you have any long running transactions - idle or active, that's your
problem. Vacuum can only clear out dead tuples older than that oldest
transaction. Deal with those. Make sure every single transaction your
app initiates commits or rolls back every single time.
You'll generally find them in pg_stat_activity, but not always. ps may
show you idle transactions not showing as idle in pg_stat_activity
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Matseas | 2006-08-21 20:25:10 | Re: Index usage |
Previous Message | Eamonn Kent | 2006-08-21 18:50:02 | Vacuum not identifying rows for removal.. |