Re: [PERFORM] Ineffective autovacuum

2011-09-27 Thread Royce Ausburn
On 27/09/2011, at 8:29 PM, Marti Raudsepp wrote: > 1. First things first: vacuum cannot delete tuples that are still > visible to any old running transactions. You might have some very long > queries or transactions that prevent it from cleaning properly: > > select * from pg_stat_activity where

Re: [PERFORM] Ineffective autovacuum

2011-09-27 Thread Scott Marlowe
On Tue, Sep 27, 2011 at 7:49 AM, Tom Lane wrote: > Royce Ausburn writes: >> Since sending this first email I've up'd the autovacuum log level and I've >> noticed that the same tables seem to be auto vacuum'd over and over again… >> Some of the tables are a bit surprising in that they're updated

Re: [PERFORM] Ineffective autovacuum

2011-09-27 Thread Tom Lane
Royce Ausburn writes: > Since sending this first email I've up'd the autovacuum log level and I've > noticed that the same tables seem to be auto vacuum'd over and over again… > Some of the tables are a bit surprising in that they're updated > semi-regularly, but not enough (I'd think) to war

Re: [PERFORM] Ineffective autovacuum

2011-09-27 Thread Marti Raudsepp
1. First things first: vacuum cannot delete tuples that are still visible to any old running transactions. You might have some very long queries or transactions that prevent it from cleaning properly: select * from pg_stat_activity where xact_start < now()-interval '10 minutes'; 2. On 8.3 and ear

Re: [PERFORM] Ineffective autovacuum

2011-09-26 Thread Royce Ausburn
On 27/09/2011, at 2:21 PM, Tom Lane wrote: > Royce Ausburn writes: >> I have a problem with autovacuum apparently not doing the job I need it to >> do. > > Hm, I wonder whether you're getting bit by bug #5759, which was fixed > after 8.3.12. If this were the case, would I see lots of auto v

Re: [PERFORM] Ineffective autovacuum

2011-09-26 Thread Tom Lane
Royce Ausburn writes: > I have a problem with autovacuum apparently not doing the job I need it to do. Hm, I wonder whether you're getting bit by bug #5759, which was fixed after 8.3.12. > I have a table named datasession that is frequently inserted, updated and > deleted from. Typically the t

[PERFORM] Ineffective autovacuum

2011-09-26 Thread Royce Ausburn
Hi all, I have a problem with autovacuum apparently not doing the job I need it to do. I have a table named datasession that is frequently inserted, updated and deleted from. Typically the table will have a few thousand rows in it. Each row typically survives a few days and is updated every 5