Re: elegant and effective way for running jobs inside a database

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elegant and effective way for running jobs inside a database
Date: 2012-03-06 22:07:51
Message-ID: CAHyXU0w9nYm-PtDQKO3B4XUxU9ZvHeQdK3PDMLH_N31epE-Fbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 6, 2012 at 4:01 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-03-06 22:26:29 Re: elegant and effective way for running jobs inside a database
Previous Message Alvaro Herrera 2012-03-06 22:01:24 Re: elegant and effective way for running jobs inside a database