Re: help with locked table(s)/transactions(s)
От | Tom Lane |
---|---|
Тема | Re: help with locked table(s)/transactions(s) |
Дата | |
Msg-id | 9195.1138740025@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | help with locked table(s)/transactions(s) (Mott Leroy <mott@acadaca.com>) |
Ответы |
Re: help with locked table(s)/transactions(s)
|
Список | pgsql-general |
Mott Leroy <mott@acadaca.com> 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
В списке pgsql-general по дате отправления: