Re: App very unresponsive while performing simple update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2006 at 11:24:05AM -0400, Greg Stark wrote:
> stark=> begin;                                                                                                                  
> BEGIN                                                                                                                           
>                                       stark=> begin;                                                                            
>                                       BEGIN                                                                                     
> stark=> update t1 set a = 0;                                                                                                    
> UPDATE 1                                                                                                                        
> stark=> update t1 set a = 1;                                                                                                    
> UPDATE 1                                                                                                                        
>                                                                                                                                 
>                                       stark=> update t2 set b = 0;                                                              
>                                       UPDATE 1                                                                                  
>                                       stark=> update t2 set b = 2;                                                              
>                                       UPDATE 1                                                                                  
> stark=> commit;                                                                                                                 
>                                       stark=> commit;                                                                           
>                                       ERROR:  deadlock detected                                                                 
>                                       DETAIL:  Process 16531 waits for ShareLock on transaction 245131; blocked by process 16566
>                                       Process 16566 waits for ShareLock on transaction 245132; blocked by process 16531.        
>                                       CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."t1" x WHERE "a" = $1 FOR SHARE OF x"
>                                       stark=> >                                                                                 
> COMMIT                       

I tried duplicating this but couldn't. What's the data in the tables?
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux