Search Postgresql Archives

Re: help with locked table(s)/transactions(s)

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

 



Mott Leroy <mott@xxxxxxxxxxx> writes:
> One thing I noticed is it seems like for every transaction lock there's 
> an "ExclusiveLock" (to be expected, a lock on the transaction num) as 
> well as a "ShareLock" on the same transaction which has not been granted 
> the lock -- does this mean that two processes are trying to share the 
> same transaction? Could this be the case?

No, the ShareLock is the means used when transaction A needs to wait for
transaction B to complete --- it tries to take a share lock on xact B's
XID, which of course is blocked as along as B is holding its
ExclusiveLock.  This is used when there is a row-update conflict, ie,
A wants to lock or update a table row that B's already locked/updated.
Unfortunately, in 7.4 there isn't any easy way to find out exactly which
row transaction A is waiting on.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux