Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D51DA4765F9 for ; Mon, 20 Jan 2003 12:48:29 -0500 (EST) Received: from otserver.onsitetech.com (unknown [207.189.100.164]) by postgresql.org (Postfix) with ESMTP id 1A4D84765D3 for ; Mon, 20 Jan 2003 12:48:29 -0500 (EST) Received: from cbnb (unverified [66.89.133.66]) by otserver.onsitetech.com (Rockliffe SMTPRA 4.5.6) with ESMTP id ; Mon, 20 Jan 2003 09:43:44 -0800 From: "Christian Brink" To: "Bhuvan A" , Subject: Re: deadlock problem in Ad serving.. Date: Mon, 20 Jan 2003 09:48:33 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/209 X-Sequence-Number: 7051 > > ~~~~~~~~~~~~~~~~~~~~~~ > > 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. You can overcome this by > locking the table in share row exclusive mode also. More details can be > found in the lock command documentation. Since your using DBI all you need to do is turn AutoCommit off when you load DBI and call commits after you verify your transaction succeeded. Turning off AutoCommit wraps a 'begin transaction' around everything. More info: http://www.perldoc.com/cpan/DBI.html#Transactions