Thread: When the trigger is called my application is awaiting the finish

When the trigger is called my application is awaiting the finish

From
"felipe@informidia.com.br"
Date:
Hello,
I'm having a problem running an update command that invokes a trigger, the problem is that the function performed takes about 45 minutes to finish and my application is locked waiting for the finish.
You know
how I can't wait for the end?


Thanks in advance

--


Felipe Pamboukian
Analista Programador
Informídia Pesquisas Esportivas Ltda.
Tel./Fax.: 55 11 3673 5566
Email: felipe@informidia.com.br
Web: www.informidia.com.br
Antes de imprimir lembre-se de sua responsabilidade e comprometimento com o Meio Ambiente
Attachment

Re: When the trigger is called my application is awaiting the finish

From
Jasen Betts
Date:
On 2010-12-16, felipe@informidia.com.br <felipe@informidia.com.br> wrote:
> This is a multi-part message in MIME format.
> --------------080402070005010104020405
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
> I'm having a problem running an update command that invokes a trigger,=20
> the problem is that the function performed takes about 45 minutes to=20
> finish and my application is locked waiting for the finish.
> You know how I can't wait for the end?

If you don't care if the update succeeds or not, just don't do the update.
if you do care you need to wait.

Perhaps there's a way yo make the trigger faster.

--
⚂⚃ 100% natural

Re: When the trigger is called my application is awaiting the finish

From
Alban Hertroys
Date:
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!