Thread: pgAgent: RFE: ability to customize step order

pgAgent: RFE: ability to customize step order

From
Matthew Gabeler-Lee
Date:
I'm trying to customize an existing pgAgent job by adding some steps, one of 
which needs to run before the existing step.  Unfortunately this doesn't 
seem to be possible without re-creating the job from scratch.

It appears that the order is determined simply by the job step table's PK. 
Since the foriegn key from the step log table doesn't have an "on update 
cascade" clause, nor is it deferrable, the ID of existing jobs that have run 
at least once can't be changed.

I managed to solve my immediate problem by recreating the job, but I think 
that making it possible to change the order of steps in a job would be a 
useful feature to add to pgAgent.

-- -Matt
"Reality is that which, when you stop believing in it, doesn't go away".                -- Philip K. Dick
GPG pubkey fingerprint: A57F B354 FD30 A502 795B 9637 3EF1 3F22 A85E 2AD1


Re: pgAgent: RFE: ability to customize step order

From
Dave Page
Date:
On Sat, May 22, 2010 at 4:33 PM, Matthew Gabeler-Lee
<cheetah@fastcat.org> wrote:
> I'm trying to customize an existing pgAgent job by adding some steps, one of
> which needs to run before the existing step.  Unfortunately this doesn't
> seem to be possible without re-creating the job from scratch.
>
> It appears that the order is determined simply by the job step table's PK.
> Since the foriegn key from the step log table doesn't have an "on update
> cascade" clause, nor is it deferrable, the ID of existing jobs that have run
> at least once can't be changed.

Steps are ordered by their name - pgAgent does something like SELECT
steps FROM steptable ORDER BY stepname, so ordering will be per the
locale of your database.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company