Re: Table locking problems?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Dan Harris <fbsd(at)drivefaster(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Table locking problems?
Date: 2005-08-09 19:08:06
Message-ID: 18199.1123614486@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> My experience is that when this type of thing happens it is typically
> specific queries that cause the problem. If you turn on statement
> logging you can get the exact queries and debug from there.

> Here are some things to look for:

> Is it a large table (and thus large indexes) that it is updating?
> Is the query using indexes?
> Is the query modifying ALOT of rows?

Another thing to look at is foreign keys. Dan could be running into
problems with an update on one side of an FK being blocked by locks
on the associated rows on the other side.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rhett Garber 2005-08-09 19:11:52 Re: Why hash join instead of nested loop?
Previous Message Tom Lane 2005-08-09 19:00:59 Re: Why hash join instead of nested loop?