From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: Dan Harris <fbsd@drivefaster.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Table locking problems?
Date: Tue, 09 Aug 2005 15:08:06 -0400
Message-ID: <18199.1123614486@sss.pgh.pa.us> (raw)
In-Reply-To: <42F8F717.6030106@commandprompt.com>
References: <52CFA236-FC43-4018-B399-1854240110FF@drivefaster.net>
<42F8F717.6030106@commandprompt.com>
"Joshua D. Drake" <jd@commandprompt.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jd@commandprompt.com, fbsd@drivefaster.net
Subject: Re: Table locking problems?
In-Reply-To: <18199.1123614486@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox