From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Christopher Browne <cbbrowne(at)gmail(dot)com>, Artur Litwinowicz <admin(at)ybka(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: elegant and effective way for running jobs inside a database |
Date: | 2012-03-06 17:57:30 |
Message-ID: | CAFj8pRDM5vGsbRuE1dcbr-g10L6c=8PhJF1NjC7gJTGy0F3=ng@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2012/3/6 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Tue, Mar 6, 2012 at 12:37 PM, Christopher Browne <cbbrowne(at)gmail(dot)com> wrote:
>> On Tue, Mar 6, 2012 at 12:20 PM, Artur Litwinowicz <admin(at)ybka(dot)com> wrote:
>>> Algorithm for first loop:
>>> check jobs exists and is time to run it
>>> run job as other sql statements (some validity check may be done)
>>> get next job
>>> no jobs - delay
>>
>> There are crucial things missing here, namely the need to establish at
>> least one database connection in order to be able to check for the
>> existence of jobs, as well as to establish additional connections as
>> contexts in which to run jobs.
>>
>> That implies the need for some New Stuff that isn't quite the same as
>> what we have within server processes today.
>>
>> There is nothing horrible about this; just that there's some extra
>> mechanism that needs to come into existence in order to do this.
>
> And also some interface. It'd be useful to have background jobs that
> executed either immediately or at a certain time or after a certain
> delay, as well as repeating jobs that execute at a certain interval or
> on a certain schedule. Figuring out what all that should look like
> is, well, part of the work that someone has to do.
+1
Regards
Pavel
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-03-06 18:00:13 | Re: Checksums, state of play |
Previous Message | Bruce Momjian | 2012-03-06 17:56:13 | Re: Checksums, state of play |