Re: Timed Triggers?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Timed Triggers?
Дата
Msg-id 39E24E78.7A60A06C@zort.on.ca
обсуждение исходный текст
Ответ на Timed Triggers?  (Rod Taylor <rod.taylor@inquent.com>)
Список pgsql-hackers
Tom Lane wrote:
> 
> Rod Taylor <rod.taylor@inquent.com> writes:
> > With the number of cron jobs that run a perl script which runs a simple
> > SELECT function(); that does various nightly cleanup or maintenance
> > (billing run) it would be much nicer to have an actual trigger run every
> > 12 hours rather than be initiated by a cron job.
> 
> Er ... why?  Seems like what you're describing is implementing the guts
> of cron in the postmaster.  I don't see a real good reason to re-invent
> the wheel like that.

My current concern is the reliance on cron, perl, and the postmaster
running properly in order to accomplish a job.  When one fails, they
operation fails.  If the postmaster is down, how does cron know that
something needs to be re-run?  In the postmaster we could issue a
trigger of type 'once every 4 hours, and on startup' to ensure that the
billing run (or whatever) is executed properly as early as possibly.  At
the moment it takes quite a bit of code outside of the database to
accomplish what would be a trivial setting for the creator of the
trigger to tie to it.

Your right though, it's too bad cron wasn't more library oriented so
that it could be used within programs rather than having to be
re-implemented.

-- 
Rod Taylor

"People get annoyed when you try to debug them." -- Larry Wall, 2nd
State of the Onion.

"A + B + C = Success if, A = Hard Work, B = Hard Play, C = Keeping your
mouth shut." -- Albert Einstein

--


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

Предыдущее
От: "Jono"
Дата:
Сообщение: Oracle to POSTGRESQL
Следующее
От: Christof Petig
Дата:
Сообщение: Re: Suggested change in include/utils/elog.h