Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > > Except I don't think this is taking an exclusive lock at all. The original > > post had the deadlock detection fire on a SharedLock. > > Yeah, but it was a ShareLock on a transaction ID, which is the trace > of s

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Greg Stark
Brendan Duddridge <[EMAIL PROTECTED]> writes: > We do have foreign keys on other tables that reference the product table. > Also, there will be updates going on at the same time as this update. When > anyone clicks on a product details link, we issue an update statement to > increment the click

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> And what PG version is this? Alvaro fixed the >> foreign-keys-take-exclusive-locks problem in 8.1 ... > Except I don't think this is taking an exclusive lock at all. The original > post had the deadlock detection fir

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Brendan Duddridge
Hi, Thanks for your replies. We are using PostgreSQL 8.1.3 on OS X Server. We do have foreign keys on other tables that reference the product table. Also, there will be updates going on at the same time as this update. When anyone clicks on a product details link, we issue an update state

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > What queries are those two processes executing? And what foreign keys do you > > have on the product table or elsewhere referring to the product table? And > > what indexes do you have on those columns? > > And what

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > What queries are those two processes executing? And what foreign keys do you > have on the product table or elsewhere referring to the product table? And > what indexes do you have on those columns? And what PG version is this? Alvaro fixed the foreign-key

Re: [PERFORM] How can I make this query faster (resend)

2006-05-28 Thread Cstdenis
From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: "Cstdenis" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 22, 2006 8:20 AM Subject: Re: [PERFORM] How can I make this query faster (resend) > On Fri, May 19, 2006 at 03:56:49PM -0700, Cstdenis wrote: > > (Its been a hour and I dont see my message on the li

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Greg Stark
Brendan Duddridge <[EMAIL PROTECTED]> writes: > Further to my issue, the update never did finish. I received the following > message in psql: > > ssprod=# update product set is_hungry = 'true' where date_modified > > current_date - 10; > ERROR: deadlock detected > DETAIL: Process 18778 waits

Re: [PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Brendan Duddridge
Further to my issue, the update never did finish. I received the following message in psql:ssprod=# update product set is_hungry = 'true'  where date_modified > current_date - 10;ERROR:  deadlock detectedDETAIL:  Process 18778 waits for ShareLock on transaction 711698780;  blocked by process 15784.

[PERFORM] App very unresponsive while performing simple update

2006-05-28 Thread Brendan Duddridge
Hi,Is Postgres supposed to be able to handle concurrent requests while doing large updates?This morning I was executing the following simple update statement that would affect 220,000 rows in my product table:update product set is_hungry = 'true'  where date_modified > current_date - 10;But the app