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 <[EMAIL PROTECTED]> 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.
pgpOUYeL19r1q.pgp
Description: PGP signature