Re: Function Issue - Mailing list pgsql-sql

From Adrian Klaver
Subject Re: Function Issue
Date
Msg-id 5315EDF0.1020600@aklaver.com
Whole thread Raw
In response to Re: Function Issue  (ALMA TAHIR <almaheena2003@yahoo.co.in>)
List pgsql-sql
On 03/03/2014 03:32 AM, ALMA TAHIR wrote:
> Hi,
>
> I am using below code in multi threaded environment, but when multiple
> threads are accessing then i get : "org.postgresql.util.PSQLException:
> ERROR: tuple concurrently updated" exception. But my concern is I need
> to use it in multi threaded env, for the same reason I am using FOR
> UPDATE with cursor. Then where is the issue??? Am I missing
> something????? Please help me with the same.....


I will say up front I am wandering out of my depth, but here it goes.

I researched the above error message and it always seems to lead back to 
issue with a system catalog tuple getting concurrent updates.

So, are we seeing all the queries that are happening when you run the 
function?
In other words is there anything that touches a system catalog, say an 
ANALYZE?

Are you sure your threads are using separate transactions and are not 
tromping over each other?

What does the Postgres log show around the error message?

>
>
>
>
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pgsql-sq-owner
Next
From: Simon G
Date:
Subject: Foreign key to a partial key