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 1331072676-sup-7140@alvh.no-ip.org
Whole thread Raw
In response to Re: elegant and effective way for running jobs inside a database  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: elegant and effective way for running jobs inside a database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Excerpts from Merlin Moncure's message of mar mar 06 19:07:51 -0300 2012:
>
> 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.

I was thinking that the connection would be kept open but no query would
be running.  Does this preclude reception of notifies?  I mean, you
don't sleep via "SELECT pg_sleep()" but rather a select/poll in the
daemon.

--
Á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: Tom Lane
Date:
Subject: Re: elegant and effective way for running jobs inside a database