From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Per-Table Transaction Isolation Level? |
Date: | 2004-11-09 10:23:40 |
Message-ID: | 20041109102339.GC4552@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Nov 09, 2004 at 04:34:16AM +0100, Florian G. Pflug wrote:
> My import sometimes crashed, becausse the meta-information tables are
> changed while importing (e.h, I pass a id to a function, the function
> does some calculations, than tries to select the row with the given id,
> but fails, because the row was deleted in the meantime). I understand
> that the standard approach to this problem is to set the transaction
> isolation level to "serializeable", thus avoiding non-repeatable reads.
I solved a problem similar to this by open two connections to the
database, one to do the readonly queries, one soley to import data. Also
had the nice feature that an error in one connection doesn't effect the
other.
Different connections could run at different isolation levels if
necessary.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Jose Bernabe Pellicer | 2004-11-09 11:44:44 | Where is postgresql?? |
Previous Message | Martijn van Oosterhout | 2004-11-09 10:10:11 | Re: Postresql RFD version 2.0 Help Wanted. |