Re: Can we have time based triggers in Postgresql??

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Can we have time based triggers in Postgresql??
Дата
Msg-id 40759D8D.5020602@Yahoo.com
обсуждение исходный текст
Ответ на Re: Can we have time based triggers in Postgresql??  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark wrote:

> Mike Nolan <nolan@gw.tssi.com> writes:
>
>> > There's no reason you couldn't write a cron daemon that retrieved its list of
>> > jobs from an SQL database. In fact we discussed doing exactly this at my last
>> > job. I expect others have thought of the same idea and wouldn't be surprised
>> > if it existed by now.
>>
>> Is there (or would we need) a way to specify access privileges for such
>> a daemon in pg_hba.conf, and would that allow controlling the access
>> privileges for each job or the user who sets it?  (ISP's would want
>> tight controls here.)
>
> Uh, that's not at all what I was picturing when I wrote the description above.
> I was picturing a cron daemon just like any other cron daemon except it
> happens to be backed by the database instead of a flat file. The privileges
> would be specified in tables just like they're currently specified in flat
> files (well currently in the directory structure above the flat files
> actually).
>
> The main advantage of such a database backed cron daemon would be the possible
> integration with other database backed systems. Job status could be viewed on
> database-backed web pages, Jobs could be created or deleted from web pages,
> failures could automatically create trouble tickets...
>

And all that can be implemented just fine with the functionality that is
there right now. Create a daemon and have triggers on the job table that
NOTIFY the daemon so that it rereads and reschedules when the next job
is due. This does not need the slightest little bit of backend changes.

A wonderfull idea for a gborg/pgfoundry project, isn't it?


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: invalid memory alloc request size 0
Следующее
От: "Jim Wilson"
Дата:
Сообщение: Re: To_char statement problems