Re: deadlock problem in Ad serving..
От | Ron Mayer |
---|---|
Тема | Re: deadlock problem in Ad serving.. |
Дата | |
Msg-id | Pine.LNX.4.33.0301200949540.13721-100000@ron обсуждение исходный текст |
Ответ на | Re: deadlock problem in Ad serving.. (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: deadlock problem in Ad serving..
|
Список | pgsql-admin |
On Mon, 20 Jan 2003, Tom Lane wrote: > > Bhuvan A <bhuvansql@myrealbox.com> writes: > >> Error:...deadlock detected... > > ... You can overcome this by locking the table in share row > > exclusive mode also... > > ...use shorter transactions (one per page, not one per several pages). Hmm... with his query: "update banner_stats set imp=imp+1 where uniqid=4330" Is it true that the problem happens when updates are done in a different order by two transactions like this: trans.1: "update banner_stats set imp=imp+1 where uniqid=4330" trans.2: "update banner_stats set imp=imp+1 where uniqid=10" trans.1: "update banner_stats set imp=imp+1 where uniqid=10" trans.2: "update banner_stats set imp=imp+1 where uniqid=4330" If so, then could the problem be avoided if in his application logic he always did the updates in the same order? ... I.e. Make sure the each transaction does the updates in the same order by sorting his updates based on uniqid in the client? Ron
В списке pgsql-admin по дате отправления: