Re: autovacuum hung?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Cox <brian(dot)cox(at)ca(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: autovacuum hung?
Date: 2009-05-31 17:32:07
Message-ID: 8968.1243791127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Brian Cox <brian(dot)cox(at)ca(dot)com> writes:
> Tom Lane [tgl(at)sss(dot)pgh(dot)pa(dot)us] wrote:
>> Are those processes actually doing anything, or just waiting? strace
>> or local equivalent would be the most conclusive check.

> These must not have been hung, because they finally completed (after
> 10-15 hrs - some time between 11pm and 8am). Question is why does it
> take so long to do this on such a relatively small table?

They might have been blocked behind some other process that was sitting
in an open transaction for some reason. The other likely cause is badly
chosen autovacuum delay, but I think that was already covered.

>> This query isn't very helpful because it fails to show locks that are
>> not directly associated with tables.

> How can that (locks not directly associated...) be determined?

Don't assume every row in pg_locks has a join partner in pg_class.
You could use an outer join ...

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Brian Cox 2009-05-31 19:08:25 Re: autovacuum hung?
Previous Message Brian Cox 2009-05-31 17:27:11 Re: autovacuum hung?