Ability to 'fork' a running transaction?

Поиск
Список
Период
Сортировка
От Alex Besogonov
Тема Ability to 'fork' a running transaction?
Дата
Msg-id f9ca530f1001301619p6eb6bf75y6b0b5e5b1e6cb80c@mail.gmail.com
обсуждение исходный текст
Ответы Re: Ability to 'fork' a running transaction?  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
I'm writing a program which needs to do a lot of (read only)
processing on a database. The program works on a SMP system with 16
CPUs, so it's natural to try to make it use all of them.

However, here lies the problem: I need to use SERIALIZABLE transaction
isolation level, and AFAIK it's not possible to make several database
connections to share the same exact view of the database.

So, is there a way to somehow stop all mutating operations? I want to
do something like:

STOP_MUTATING_OPERATIONS;
for(int f=0;f<10;++f)
{
   START_CONNECTION(f);
   SET_TO_SERIALIZABLE(f);
}
START_MUTATING_OPERATIONS();

for(int f=0;f<10;++f)
   DO_WORK_IN_CONNECTION(f);

Or is there a better way?

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Changing FS when full
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Ability to 'fork' a running transaction?