Re: Multithreaded queue in PgSQL

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Multithreaded queue in PgSQL
Дата
Msg-id 200806101254.57397.dfontaine@hi-media.com
обсуждение исходный текст
Ответ на Multithreaded queue in PgSQL  (Nikola Milutinovic <alokin1@yahoo.com>)
Список pgsql-general
Le mardi 10 juin 2008, Nikola Milutinovic a écrit :
> Suppose we have one table in PgSQL which is a job queue, each row
> represents one job with several status flags, IDs,... Several processes
> will attempt to access the queue and "take" their batch of jobs, the batch
> will have some parameterizable size. So, the simple idea is "select N
> lowest IDs that do not have a flag <in process> set and set the flag",
> "then proceed with whatever it is that should be done".

You may find that the PGQ component of skytools is what you want:
  http://pgfoundry.org/projects/skytools
  http://skytools.projects.postgresql.org/doc/
  http://skytools.projects.postgresql.org/doc/pgq-sql.html

And there's even a nice and recent presentation paper about it:
  http://www.pgcon.org/2008/schedule/events/79.en.html

And a less recent but still useful blog entry on the subject:

http://kaiv.wordpress.com/2007/10/19/skytools-database-scripting-framework-pgq/

Regards,
--
dim

Вложения

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

Предыдущее
От:
Дата:
Сообщение: Re: Insert into master table ->" 0 rows affected" -> Hibernate problems
Следующее
От: IPS
Дата:
Сообщение: Query on Oracle 10g Merge Function equivalent command/function in Postgre