Re: concurrent updates problem

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: mwaples(at)waples(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: concurrent updates problem
Date: 2001-03-19 10:02:25
Message-ID: Pine.LNX.4.21.0103192102020.31261-100000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You should not be experiencing this if you are using transactions.

Gavin

On Mon, 19 Mar 2001 mwaples(at)waples(dot)net wrote:

> I have on a web application
> update threads set views = views + 1 where forum_id = 1 and thread_id =
> 1
> just to record view for that page - stupid I know but people want it.
> Problem comes when I use apache's ab to test it.
>
> It just doesnt produce the correct result with 10 or so concurrent
> connections. The views ends up being completely out.(no failed queries)
> I read up on transaction Isolations , using select for update etc
> but can't get it to work correctly - I thought serilizable might do the
> trick but only few queries were rolled back -
> Can anyone point me in the right direction to solve this ?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mwaples 2001-03-19 10:09:16 Re: concurrent updates problem
Previous Message Richard Huxton 2001-03-19 09:54:12 Re: concurrent updates problem