Re: deadlock with vacuum full on 7.4.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: deadlock with vacuum full on 7.4.5
Date: 2004-10-12 22:27:44
Message-ID: 7833.1097620064@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> Last night one of these vacuum fulls deadlocked with a query on this
> table. Both were stuck doing nothing until I did a kill -INT on the
> backends doing the vacuum.

> So my questions:
> 1) What can I do to avoid this?
> 2) What do I do next time this happens to get more debugging info out of
> the situation?

Look in pg_locks and pg_stat_activity.

I think it is highly unlikely that there was a deadlock inside the
database. Far more likely that both jobs were waiting on some
idle-in-transaction client whose transaction was holding a lock
on the table.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Wolfe 2004-10-12 22:29:27 error opening pg_clog file
Previous Message Joseph Shraibman 2004-10-12 21:52:06 deadlock with vacuum full on 7.4.5