Re: elegant and effective way for running jobs inside a database - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: elegant and effective way for running jobs inside a database
Date
Msg-id 1331071100-sup-4771@alvh.no-ip.org
Whole thread Raw
In response to Re: elegant and effective way for running jobs inside a database  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: elegant and effective way for running jobs inside a database  (Merlin Moncure <mmoncure@gmail.com>)
Re: elegant and effective way for running jobs inside a database  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
Excerpts from Dimitri Fontaine's message of mar mar 06 18:44:18 -0300 2012:
> Josh Berkus <josh@agliodbs.com> writes:
> > Activity and discretion beyond that could be defined in PL code,
> > including run/don't run conditions, activities, and dependancies.  The
> > only thing Postgres doesn't currently have is a clock which fires
> > events.  Anything we try to implement which is more complex than the
> > above is going to not work for someone.  And the pg_agent could be
> > adapted easily to use the Postgres clock instead of cron.
>
> Oh, you mean like a ticker?  If only we knew about a project that did
> implement a ticker, in C, using the PostgreSQL licence, and who's using
> it in large scale production.  While at it, if such a ticker could be
> used to implement job queues…
>
>   https://github.com/markokr/skytools/tree/master/sql/ticker

Why do we need a ticker?  Just fetch the time of the task closest in the
future, and sleep till that time or a notify arrives (meaning schedule
change).

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: elegant and effective way for running jobs inside a database
Next
From: Merlin Moncure
Date:
Subject: Re: elegant and effective way for running jobs inside a database