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

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elegant and effective way for running jobs inside a database
Date: 2012-03-10 12:11:52
Message-ID: CA+U5nMLutNa9HgcWs-pbYkW2jJj-mppMwBHPq7uLyrA=L9g+XQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 9, 2012 at 6:51 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 03/09/2012 01:40 PM, Robert Haas wrote:
>>
>> On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheeler<david(at)justatheory(dot)com>
>>  wrote:
>>>
>>> On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote:
>>>>
>>>> 100% agree  (having re-read the thread and Alvaro's idea having sunk
>>>> in).  Being able to set up daemon processes side by side with the
>>>> postmaster would fit the bill nicely.  It's pretty interesting to
>>>> think of all the places you could go with it.
>>>
>>> pgAgent could use it *right now*. I keep forgetting to restart it after
>>> restarting PostgreSQL and finding after a day or so that no jobs have run.
>>
>> That can and should be fixed by teaching pgAgent that failing to
>> connect to the server, or getting disconnected, is not a fatal error,
>> but a reason to sleep and retry.
>
>
> Yeah. It's still not entirely clear to me what a postmaster-controlled
> daemon is going to be able to do that an external daemon can't.

Start and stop at the same time as postmaster, without any pain.

It's a considerable convenience to be able to design this aspect once
and then have all things linked to the postmaster follow that. It
means people will be able to write code that runs on all OS easily,
without everybody having similar but slightly different code about
starting up, reading parameters, following security rules etc.. Tight
integration, with good usability.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-03-10 12:35:12 Re: poll: CHECK TRIGGER?
Previous Message Vik Reykja 2012-03-10 11:11:38 Re: Future of our regular expression code