Re: elegant and effective way for running jobs inside a database

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: elegant and effective way for running jobs inside a database
Дата
Msg-id 1331051464-sup-5208@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: elegant and effective way for running jobs inside a database  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: elegant and effective way for running jobs inside a database
Список pgsql-hackers
Excerpts from Tom Lane's message of mar mar 06 12:47:46 -0300 2012:
> Robert Haas <robertmhaas@gmail.com> writes:

> > But since you brought it up, I think there is a lot of value to having
> > a scheduler that's integrated with the database.  There are many
> > things that the database does which could also be done outside the
> > database, but people want them in the database because it's easier
> > that way.  If you have a web application that talks to the database,
> > and which sometimes needs to schedule tasks to run at a future time,
> > it is much nicer to do that by inserting a row into an SQL table
> > somewhere, or executing some bit of DDL, than it is to do it by making
> > your web application know how to connect to a PostgreSQL database and
> > also how to rewrite crontab (in a concurrency-safe manner, no less).
>
> Sure, and I would expect that a client-side scheduler would work just
> the same way: you make requests to it through database actions such
> as inserting a row in a task table.

What such an external scheduler would need from core is support for
starting up and shutting down along postmaster (as well as restarts at
appropriate times).  Postmaster already has the ability to start and
shut down many processes depending on several different policies; I
think it's mostly a matter of exporting that funcionality in a sane way.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Dropping PL language retains support functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Checksums, state of play