Re: Query using partitioned table hangs - Mailing list pgsql-general

From Rob W
Subject Re: Query using partitioned table hangs
Date
Msg-id 502816.58926.qm@web112008.mail.gq1.yahoo.com
Whole thread Raw
In response to Re: Query using partitioned table hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
--- 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
wasbeing 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
finebefore we started partitioning an unrelated table.  

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: how to allow a sysid to be a superuser?
Next
From: Allan Kamau
Date:
Subject: Implementing next 30 (or so) rows "sliding window"