Re: Mutex via database

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Mutex via database
Дата
Msg-id 4278B436.6050102@logix-tt.com
обсуждение исходный текст
Ответ на Mutex via database  (Enrico Weigelt <weigelt@metux.de>)
Список pgsql-sql
Hi, Enrico,

Enrico Weigelt wrote:

> i've a dozen of servers processing jobs from a database. 
> Some servers may only run exactly once, otherwise I'll get jobs 
> done twice. 
> 
> Is there any way for implementing an kind of mutex within the
> database, which is automatically released if the holding 
> process/connection dies ?

Use the "LOCK" sql command, possibly together with transaction isolation
set to serializable.

Markus


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

Предыдущее
От: Enrico Weigelt
Дата:
Сообщение: Mutex via database
Следующее
От: "2000 Informatica"
Дата:
Сообщение: all server processes terminated; reinitializing