| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера