| От | Csaba Nagy |
|---|---|
| Тема | Re: Deadlock error in INSERT statements |
| Дата | |
| Msg-id | 1254928125.3372.435.camel@pcd12478 обсуждение исходный текст |
| Ответ на | Deadlock error in INSERT statements (Gnanam <gnanam@zoniac.com>) |
| Список | pgsql-hackers |
On Wed, 2009-10-07 at 16:34 +0200, Gnanam wrote: > NOTE: I've seen "deadlock" errors in UPDATE statement but why it is throwing > in INSERT statements. It is because of the foreign key. Inserting a child row will lock the corresponding parent row, and if you insert multiple rows with different parents in the same transaction, and do that in different concurrent transactions but in different order of the parent rows, you can get a deadlock. If you keep in mind that the parent row is locked on the insert of a child row, you will figure out what's happening... BTW, I don't think the "hackers" list is the right one for this kind of question, better use the "general" list... Cheers, Csaba.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера