Re: Scheduled jobs - Mailing list pgsql-hackers

From Nigel J. Andrews
Subject Re: Scheduled jobs
Date
Msg-id Pine.LNX.4.21.0305122331190.24875-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: Scheduled jobs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 12 May 2003, Tom Lane wrote:

> "Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
> > Only cron can't handle some of those cases listed, but then one could always
> > patch one's own local installation of pg_ctl etc. to run things at startup and
> > shutdown.
> 
> If you are using a typical init script setup, it's easy to add
> additional operations to the init script's start and stop actions.
> 
> I'm a tad suspicious of adding on-shutdown actions anyway, as there's
> little guarantee they would get done (consider system crash, postmaster
> crash, etc).
> 
>             regards, tom lane

Absolutely. That's why you'd patch your startup/shutdown scripts. Adding it to
pg_ctl does enable those to kick the necessary stuff without requiring use of
the system's init scripts for manual control of the postmaster. When the
emphasis on the 'controlled' aspect of this is acknowledged then it's just a
toss up between editing pg_ctl or your own wrapper for it. I would go for my
own wrapper since then that still leaves the ability for pg_ctl to be used
_without_ kicking those startup/shutdown actions.


I believe this has arisen several times and each time there's been no
enthusiasm to stick cron into the core which I think is a reasonable stance.


-- 
Nigel J. Andrews



pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Scheduled jobs
Next
From: Þórhallur Hálfdánarson
Date:
Subject: Re: Scheduled jobs