agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] crash due to huge load?
Date: Sat, 29 Oct 2005 10:26:39 +0200
Message-ID: <4363323F.8070306@tada.se> (raw)
In-Reply-To: <43621A50000027DB@mail-5.mail.tiscali.sys>
References: <43621A50000027DB@mail-5.mail.tiscali.sys>

Roberto,
You can never guarantee coherence between two databases unless you use 
2-phase commits.
Think "what if I pull the plug at precisely this moment" (i.e. between 
#1 and #2 for instance).

Regarding the crash, I would really like to help you find the cause, but 
you will have to provide the backend log.

Regards,
Thomas Hallgren

rcolmegna at tiscali.it wrote:
> due to the fact that I can change my app-behaviour, I used a small "trick"!
>
> When the app need to begin a transaction it must make two SQL calls:
> 1) BEGIN;
> 2) INSERT INTO distribtx.bound(state) VALUES('B');
>
> the INSERT notify to PLJava the transaction begin.
>
> At the commit:
> 1) COMMIT;
> 2) INSERT INTO distribtx.bound(state) VALUES('C');  [executed only without
> commit except]
>
> At the rollback:
> 1) ROLLBACK;
> 2) INSERT INTO distribtx.bound(state) VALUES('R');
>
> As you can see the remote-DB coherence is assured.
>
> This is in theory ... in pratic I must dismiss this architecture due to pgsql
> crash ...
> (sigh! ... I don't want use JBoss)
>
>
> ---- Messaggio originale ----
> Data: Fri Oct 28 20:44:32 CEST 2005
> Da: Thomas Hallgren<thomas at tada.se>
> A: rcolmegna at tiscali.it
> Cc: pljava-dev at gborg.postgresql.org
> Ccn: 
> Ogg.: Re: [Pljava-dev] crash due to huge load?
>
>
> I'm a bit curious. Why do you create a connection to another PG inside a
> trigger? That implies that you create another transaction that is not
> synchronized with the one your trigger is executing in. What happens if
> (when) your original transaction is rolled back?
>
> Regards,
> Thomas Hallgren
>
> rcolmegna at tiscali.it wrote:
>   
>> Hi,
>>
>> I'm using a recompiled last CVS-checkout of PLJAVA on PG8.0.3 and JDK1.5.0.
>>
>> I build a thread-oriented trigger (make a thread which build a connection
>> to another
>> PG).
>>
>> I obtain frequently this error msg:
>>
>> server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>>
>> But I haven't any exception on thread-handled logs (LOG4J).
>>
>> TIA
>> Roberto Colmegna
>>
>>
>> __________________________________________________________________
>> TISCALI ADSL
>> Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone
>> Telecom a partire da 19,95 Euro/mese.
>> Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
>> http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/
>>
>>
>>
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>>
>>     
>
> __________________________________________________________________
> TISCALI ADSL
> Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone 
> Telecom a partire da 19,95 Euro/mese.
> Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
> http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/
>
>
>
>   





view thread (5+ messages)

Message-ID: <4363323F.8070306@tada.se>
Permalink:  ../4363323F.8070306@tada.se/
Also on:    postgresql.org/message-id/4363323F.8070306@tada.se

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: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] crash due to huge load?
  In-Reply-To: <4363323F.8070306@tada.se>

* 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