Re: deadlock problem in Ad serving..

From: Ron Mayer <ron(at)intervideo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bhuvan A <bhuvansql(at)myrealbox(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: deadlock problem in Ad serving..
Date: 2003-01-20 21:31:34
Message-ID: Pine.LNX.4.33.0301201326210.13721-100000@ron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


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 top and a banner on the bottom),
and doing accounting of which banners were shown. In that case
it might have been interesting to keep some of his information
in a transaction.

start transaction...
insert_a_new_cookie_record_if_it_didn't_exits..
record the top_banner...
record the bottom_banner...
end transaction...

I've done something like that to count how many distinct users saw
particular ads. In this case sorting the small number (2) of banners
in his application logic would be easy.

> I would suggest using a separate transaction for each webpage visited.
> Holding a transaction open across multiple page traversals is widely
> considered bad news for a number of reasons, not only this one.

I understand this part.

Ron

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Leland F. Jackson, CPA 2003-01-21 03:18:26 Re: Stalled post to pgsql-admin
Previous Message Tom Lane 2003-01-20 20:20:12 Re: deadlock problem in Ad serving..