Re: elegant and effective way for running jobs inside a database
Merlin Moncure <mmoncure@gmail.com>
From: Merlin Moncure <mmoncure@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Dimitri Fontaine <dimitri@2ndquadrant.fr>,
Josh Berkus <josh@agliodbs.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-06T22:07:51Z
Lists: pgsql-hackers
On Tue, Mar 6, 2012 at 4:01 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote: > 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). Because that can't be done in userland (at least, not without stored procedures) since you'd have to keep an open running transaction while sleeping. merlin