Re: "trigger"ing a procedure every X minutes

Поиск
Список
Период
Сортировка
От Fran Fabrizio
Тема Re: "trigger"ing a procedure every X minutes
Дата
Msg-id 3B1E6EDF.491BFA3F@exchange.webmd.net
обсуждение исходный текст
Ответ на "trigger"ing a procedure every X minutes  (Fran Fabrizio <ffabrizio@Exchange.WebMD.net>)
Ответы Re: "trigger"ing a procedure every X minutes
Список pgsql-general
Some thoughts are:

1.  It would be portable with the database.  I don't have to go setting up
crons on the new machine if I move the db.
2.  The cron usually involves writing a shell/perl/whatever script to call
the psql client and pass in SQL queries via STDIN or file redirect just to
invoke the desired procedure.  An internal mechanism would bypass all of
that.
3.  All of the code that maintains the database could be in one place
internal to the db.

It's certainly not a big deal to use the cron, I just thought maybe someone
had experimented with an internal mechanism.  I'd like to try it someday,
when I know a lot more about Pg.  My current project has an ever-growing
number of cron jobs (up to 6 now) and was just thinking about various ways to
tidy it up.

Thanks for the info,
Fran

> Fran Fabrizio <ffabrizio@Exchange.WebMD.net> writes:
> > Is the preferred method of calling a procedure every X minutes to have a
> > cronjob installed external to the database,
>
> Yes.
>
> I see no need for us to replicate the functionality of cron ...
>
>                         regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "trigger"ing a procedure every X minutes
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PostgreSQL Replication Server?