From: Dag Gullberg <dag.gullberg@telia.com>
To: pgsql-sql@postgresql.org
Subject: Concurrency problem
Date: 03 Oct 2004 12:58:52 +0200
Message-ID: <1096801131.5238.32.camel@hemma> (raw)
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 TO
adm,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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dag.gullberg@telia.com
Subject: Re: Concurrency problem
In-Reply-To: <1096801131.5238.32.camel@hemma>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox