Re: When the trigger is called my application is awaiting the finish - Mailing list pgsql-general

From Alban Hertroys
Subject Re: When the trigger is called my application is awaiting the finish
Date
Msg-id 410676B6-EB9E-457D-A0A9-9A3F405981D0@solfertje.student.utwente.nl
Whole thread Raw
In response to When the trigger is called my application is awaiting the finish  ("felipe@informidia.com.br" <felipe@informidia.com.br>)
List pgsql-general
On 16 Dec 2010, at 18:13, felipe@informidia.com.br wrote:

> Hello,
> I'm having a problem running an update command that invokes a trigger, the problem is that the function performed
takesabout 45 minutes to finish and my application is locked waiting for the finish.  
> You know how I can't wait for the end?

As usual, that depends. If running that function asynchronously from your update can not break referential integrity or
causedead-locks with your update (e.g. they aren't directly connected), then you can use LISTEN/NOTIFY to notify
anotherprocess on a different connection that the function should be performed. 

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4d1473b6802655198511903!



pgsql-general by date:

Previous
From: Tsutomu Nakajima
Date:
Subject: did freese in creating a database cluster
Next
From: Elliot Chance
Date:
Subject: Load C++ for functions?