Skip site navigation (1) Skip section navigation (2)

Re: App very unresponsive while performing simple update

From: Brendan Duddridge <brendan(at)clickspace(dot)com>
To: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: App very unresponsive while performing simple update
Date: 2006-05-28 09:43:23
Message-ID: 21B15664-F4EE-462C-88B4-EEEB2B4A979F@clickspace.com (view raw or flat)
Thread:
Lists: pgsql-performance
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 for ShareLock on transaction 711698780;   
blocked by process 15784.
Process 15784 waits for ShareLock on transaction 711697098; blocked  
by process 18778.

This is the second time I've tried to run this query without success.

Would changing the isolation level to serializable in my psql session  
help with this?

Thanks,

____________________________________________________________________
Brendan Duddridge | CTO | 403-277-5591 x24 |  brendan(at)clickspace(dot)com

ClickSpace Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB  T2G 0V9

http://www.clickspace.com

On May 28, 2006, at 3:37 AM, Brendan Duddridge wrote:

> 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 application that accesses the product table for reading  
> became very unresponsive while the update was happening.
>
> Is it just a matter of slow I/O? The CPU usage seemed very low  
> (less than 5%) and iostat showed  less than 1 MB / sec throughput.
>
> I was doing the update in psql.
>
> Are there any settings that I could tweak that would help with this  
> sort of thing?
>
> Thanks,
>
> ____________________________________________________________________
> Brendan Duddridge | CTO | 403-277-5591 x24 |  brendan(at)clickspace(dot)com
>
> ClickSpace Interactive Inc.
> Suite L100, 239 - 10th Ave. SE
> Calgary, AB  T2G 0V9
>
> http://www.clickspace.com
>

In response to

Responses

pgsql-performance by date

Next:From: CstdenisDate: 2006-05-28 10:49:06
Subject: Re: How can I make this query faster (resend)
Previous:From: Brendan DuddridgeDate: 2006-05-28 09:37:57
Subject: App very unresponsive while performing simple update

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group