Re: Per-Table Transaction Isolation Level?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Per-Table Transaction Isolation Level?
Дата
Msg-id 20041109102339.GC4552@svana.org
обсуждение исходный текст
Ответ на Per-Table Transaction Isolation Level?  ("Florian G. Pflug" <fgp@phlo.org>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Per-Table Transaction Isolation Level?
Следующее
От: "Tk421"
Дата:
Сообщение: Functions in postgres