agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: ALMA TAHIR <almaheena2003@yahoo.co.in>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Function Issue
Date: Tue, 04 Mar 2014 07:14:56 -0800
Message-ID: <5315EDF0.1020600@aklaver.com> (raw)
In-Reply-To: <1393846322.42246.YahooMailNeo@web192703.mail.sg3.yahoo.com>
References: <1393503792.47079.YahooMailNeo@web192706.mail.sg3.yahoo.com>
	<30402.1393511579@sss.pgh.pa.us>
	<1393593190.2407.YahooMailNeo@web192706.mail.sg3.yahoo.com>
	<1393846322.42246.YahooMailNeo@web192703.mail.sg3.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (7+ messages)

Message-ID: <5315EDF0.1020600@aklaver.com>
Permalink:  ../5315EDF0.1020600@aklaver.com/
Also on:    postgresql.org/message-id/5315EDF0.1020600@aklaver.com

reply

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: adrian.klaver@aklaver.com, almaheena2003@yahoo.co.in, tgl@sss.pgh.pa.us
  Subject: Re: Function Issue
  In-Reply-To: <5315EDF0.1020600@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox