Re: using database for queuing operations?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: using database for queuing operations?
Дата
Msg-id 22870.1095721670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на using database for queuing operations?  (Mark Harrison <mh@pixar.com>)
Ответы Re: using database for queuing operations?  (Mark Harrison <mh@pixar.com>)
Список pgsql-general
Mark Harrison <mh@pixar.com> writes:
> It would be really great if I could handle this without the front end
> program, so that multiple programs could do something like the following:

>      select next image to be processed (with above select logic)
>      process the image
>      delete the row for that image

> I think that I can use "select for update" to obtain a write lock (so that
> I can safely delete the row when finished), but I'm unsure if it's possible
> to avoid the race condition where two processes would get the same row.

See the archives; this has been discussed in great detail before
(several times before, if memory serves).

            regards, tom lane

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

Предыдущее
От: David Helgason
Дата:
Сообщение: Re: Any reason not to use inheritance?
Следующее
От: Mark Harrison
Дата:
Сообщение: Re: using database for queuing operations?