Re: autovacuum hung?

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

Tom Lane [tgl(at)sss(dot)pgh(dot)pa(dot)us] wrote:
> No, no, and no. What would be best is to find out what actually
> happened. The evidence is gone now, but if you see it again please
> take a closer look.
OK. You mentioned strace. It's got a lot of options; any in particular
that would be useful if this happens again?

Brian


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 21:13:56
Message-ID: 15274.1243804436@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

Brian Cox <brian(dot)cox(at)ca(dot)com> writes:
> OK. You mentioned strace. It's got a lot of options; any in particular
> that would be useful if this happens again?

I'd just do "strace -p processID" and watch it for a little while.
If it's not hung, you'll see the process issuing kernel calls at
some rate or other.

If it is hung, you'll most likely see something like

semop(...)

and it just sits there. Also, if you see nothing but a series of
select()s with varying timeouts, that would suggest a stuck spinlock
(although I doubt that was happening, as it would eventually timeout
and report a failure).

regards, tom lane


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 21:14:59
Message-ID: 15301.1243804499@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

Brian Cox <brian(dot)cox(at)ca(dot)com> writes:
> OK. You mentioned strace. It's got a lot of options; any in particular
> that would be useful if this happens again?

Oh, and don't forget the more-complete pg_locks state. We'll want all
the columns of pg_locks, not just the ones you showed before.

regards, tom lane