From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: pgsql-admin@postgresql.org
Subject: deadlock problem in Ad serving..
Date: Mon, 20 Jan 2003 14:18:54 +0530
Message-ID: <200301201418.54276.mallah@trade-india.com> (raw)
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 to two different viewers.
I have been able to verify using two psql sessions that unless one transaction commits
the update, the update from the second client (also in a transaction block) keeps
wating to happen.
as a result such updates get queued up and i finally get "dead lock detected" error.
~~~~~~~~~~~~~~~~~~~~~~
Error: DBD::Pg::st execute failed: ERROR: deadlock detected at
/usr/local/perlapache/lib/perl/Banner.pm line 71, <GEN1> line 7.
~~~~~~~~~~~~~~~~~~~~~~
can anyone tell me how shud i go ahead tosolve this problem
regds
mallah.
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mallah@trade-india.com
Subject: Re: deadlock problem in Ad serving..
In-Reply-To: <200301201418.54276.mallah@trade-india.com>
References: <200301201418.54276.mallah@trade-india.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox