Re: help with locked table(s)/transactions(s)
От | Tom Lane |
---|---|
Тема | Re: help with locked table(s)/transactions(s) |
Дата | |
Msg-id | 29624.1138803851@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: 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: > I'm still confused by the behavior however. The locking behaves as if > its some kind of *table* level lock, because while the function is > executing (a long time), a dozen updates and inserts build up waiting > for some lock to be released. If the loop just occassionally puts a lock > on a few different rows, I don't see how that could cause the > experienced behavior -- presumably the lock on those particular rows is > released after its iteration through the loop. Unless, of course, the > lock isn't given up ... No, the locks would be held till end of transaction. It is a little odd that you have so many conflicts, though, unless the referenced table is pretty small and/or this loop manages to touch a large fraction of the possible keys. regards, tom lane
В списке pgsql-general по дате отправления: