Re: deadlock problem in Ad serving.. - Mailing list pgsql-admin

From Ron Mayer
Subject Re: deadlock problem in Ad serving..
Date
Msg-id Pine.LNX.4.33.0301201326210.13721-100000@ron
Whole thread Raw
In response to Re: deadlock problem in Ad serving..  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: deadlock problem in Ad serving..
Next
From: "codeWarrior"
Date:
Subject: Re: Database logging.... Recycle server logs ???