On Tue, Nov 09, 2004 at 04:34:16AM +0100, Florian G. Pflug wrote:
Quote:
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/
Quote:
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. |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQFBkJqrY5Twig3Ge+YRAu0uAJ4k5BKKjxe+T0ItY7D09U UzOvXZqgCgi7on
Z50jpuogLnsOd5SRvDOjMLY=
=uwww
-----END PGP SIGNATURE-----