Re: Debugging deadlocks
От | Alvaro Herrera |
---|---|
Тема | Re: Debugging deadlocks |
Дата | |
Msg-id | 20050328015105.GA28150@dcc.uchile.cl обсуждение исходный текст |
Ответ на | Re: Debugging deadlocks ("Guy Rouillier" <guyr@masergy.com>) |
Список | pgsql-general |
On Sun, Mar 27, 2005 at 06:02:25PM -0600, Guy Rouillier wrote: > With the current implementation, it appears I need to either (1) always > commit after every inserted row, or (2) single thread my entire insert > logic. Neither of these two alternatives is very desirable. I think a usual workaround is to declare the contraints INITIALLY DEFERRED. This will delay the check until commit time, so the time window to deadlock is smaller. There still is a possibility though, so you need to take it into account. It occurs to me that if you control all insertion threads, you could try to serialize access to COMMIT in order to make the chance of deadlock even smaller. -- Alvaro Herrera (<alvherre[@]dcc.uchile.cl>) "Industry suffers from the managerial dogma that for the sake of stability and continuity, the company should be independent of the competence of individual employees." (E. Dijkstra)
В списке pgsql-general по дате отправления: