Re: Query using partitioned table hangs

From: Rob W <digital_illuminati(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Query using partitioned table hangs
Date: 2009-12-08 18:39:35
Message-ID: 502816.58926.qm@web112008.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Allan Kamau 2009-12-08 18:49:13 Implementing next 30 (or so) rows "sliding window"
Previous Message Scott Marlowe 2009-12-08 18:26:10 Re: how to allow a sysid to be a superuser?