Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Rajesh Kumar Mallah.
Hi, Guys thanks for the response.. I am using perl DBI. In fact i have tried doing the commit immediately after the update in the script then i saw my pg_stat_activity reporting lots of queued update transactions. I would like to discuss this problem further but not able to do so at the mome

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Ron Mayer
On Mon, 20 Jan 2003, Tom Lane wrote: > > If I understood correctly, he's tracking webpage hits; so the updates > are going to correspond to the sequence in which visitors move to > different webpages. Ah... I was thinking he was counting banners served within a single page (perhaps a banner on to

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Tom Lane
Ron Mayer <[EMAIL PROTECTED]> writes: > 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: "

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Christian Brink
> > ~~ > > Error: DBD::Pg::st execute failed: ERROR: deadlock detected at > > /usr/local/perlapache/lib/perl/Banner.pm line 71, line 7. > > ~~ > > It is a genuine error, occurs while two or more transaction process tries > to update/delete a same record sim

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Ron Mayer
On Mon, 20 Jan 2003, Tom Lane wrote: > > Bhuvan A <[EMAIL PROTECTED]> 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 qu

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Tom Lane
Bhuvan A <[EMAIL PROTECTED]> writes: >> ~~ >> Error: DBD::Pg::st execute failed: ERROR: deadlock detected at >> /usr/local/perlapache/lib/perl/Banner.pm line 71, line 7. >> ~~ > It is a genuine error, occurs while two or more transaction process tries > to

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Rajesh Kumar Mallah.
thanks for ur response bhuvan, i will read that doc and try it again. regds mallah. On Monday 20 January 2003 03:32 pm, Bhuvan A wrote: > > ~~ > > Error: DBD::Pg::st execute failed: ERROR: deadlock detected at > > /usr/local/perlapache/lib/perl/Banner.pm line 71, line 7.

Re: [ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Bhuvan A
> ~~ > Error: DBD::Pg::st execute failed: ERROR: deadlock detected at > /usr/local/perlapache/lib/perl/Banner.pm line 71, line 7. > ~~ It is a genuine error, occurs while two or more transaction process tries to update/delete a same record simultaneously.

[ADMIN] deadlock problem in Ad serving..

2003-01-20 Thread Rajesh Kumar Mallah.
Hi, I use postgresql in serving Ads and counting impression of the ad banners. whenever an Ad is served I do a update. update banner_stats set imp=imp+1 where uniqid=4330 in a transaction. In a busy web environment like ours there are high chances that the same page is displyed concurrently