Concurrency problem - Mailing list pgsql-sql

From Dag Gullberg
Subject Concurrency problem
Date
Msg-id 1096801131.5238.32.camel@hemma
Whole thread Raw
Responses Re: Concurrency problem
List pgsql-sql
Hi,
I have a problem with concurrency,
where ordinary selects render me

Warning: pg_query(): Query failed: ERROR: tuple concurrently updated
CONTEXT: PL/pgSQL function "get_rights" line 5 at SQL statement in
/home/site/PHP/db_func.php on line 301

Code of get_rights:GRANT SELECT ON c.users TOadm,w3;
                                                                          SELECT rights INTO result               FROM
c.users              WHERE usr_id=uid;
 
       REVOKE ALL ON c.users FROM w3,adm;       RETURN result;

What function is in error at a specific point in time appears to 
be random. There are no "update" SQL commands issued between two loads
(actually two meny selections in sequence, the first not being served
completely). Still the db complain about "updates". I use triggers only
at "create" and in some instances "update", not when doing "select".
Tables are interconnected by foreign keys, sometimes mutliple.

Is there anybody out there with similar experiences? 
Someone who might point in some directions in terms of 
documentation of *how* to design and use a database to 
avoid concurrency problems?

Any thoughts on this are greatly appreciated.

/Dag




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [NOVICE] date_trunc'd timestamp index possible?
Next
From: "D. Duccini"
Date:
Subject: date_trunc'd timestamp index possible?