Re: concurrent updates problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: mwaples(at)waples(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: concurrent updates problem
Date: 2001-03-19 15:48:53
Message-ID: 3AB62A65.84C955E1@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mwaples(at)waples(dot)net wrote:
>
> Richard Huxton wrote:
> >
> > From: <mwaples(at)waples(dot)net>
> >
> > > I have on a web application
> > > update threads set views = views + 1 where forum_id = 1 and thread_id =
> > > 1

> Im using aolserver - but its Im writing it in php later too.
> code is below

[snipped code that looked simple enough to a non tcl-er]
>
> they both produces sometimes correct results, sometimes under what the
> result should be and sometimes over it.
> But 5 or 6 concurrent requests always produce the correct results, any
> more than that things go wrong.

Your code looks fine (it's only sql="..." and exec $sql so there can't
be anything wrong with it).

The only things I can think of are:
1. bug with pg+aolserver (unlikely I think openACS uses that combo). The
only peculiarity I know with aolsvr is that it's multi-threading, and I
don't know if that could cause this.

2. you aren't actually fetching the number of pages you think you are.
It could be that calls are failing and being redone without ab telling
you. Not sure how to tell this without counting packets on the
wire/turning logging to max on the webserver.

- Richard Huxton

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-19 16:12:01 Re: concurrent updates problem
Previous Message Brian C. Doyle 2001-03-19 15:40:29 Win Nt setup help please