--- On Mon, 12/7/09, Tom Lane <wrote:
> Have you looked into pg_locks to see if it's blocked
> waiting for a lock?
> The TRUNCATE in particular would require exclusive lock on
> the table, so it could be waiting for some other process 
> that's touched the table.

Thanks Tom - while pg_locks did not reveal any locks, you gave me the clue that 
solved the mystery: the truncate command.

pg_locks show no locks at all on this table, but just in case, I tried removing 
an ANLAYZE on the table being truncated, that was being done right at the 
beginning of the sproc, and should have finished long before the truncate was 
being run, and hey presto no deadlocks.

A couple of weird things about this: the fact the pg_locks showed no locks, and 
secondly the fact that it used to work fine before we started partitioning an 
unrelated table. 

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to