Concurrency problem
От | Dag Gullberg |
---|---|
Тема | Concurrency problem |
Дата | |
Msg-id | 1096801131.5238.32.camel@hemma обсуждение исходный текст |
Ответы |
Re: Concurrency problem
|
Список | 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 по дате отправления: