Re: concurrent updates problem - Mailing list pgsql-general

From Richard Huxton
Subject Re: concurrent updates problem
Date
Msg-id 3AB62A65.84C955E1@archonet.com
Whole thread Raw
In response to Re: concurrent updates problem  ("Richard Huxton" <dev@archonet.com>)
List pgsql-general
mwaples@waples.net wrote:
>
> Richard Huxton wrote:
> >
> > From: <mwaples@waples.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

pgsql-general by date:

Previous
From: "Brian C. Doyle"
Date:
Subject: Win Nt setup help please
Next
From: Tom Lane
Date:
Subject: Re: concurrent updates problem