Re: Using pgAdmin and pgAgent with Greenplum - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Using pgAdmin and pgAgent with Greenplum
Date
Msg-id 4725E5A1.8020909@postgresql.org
Whole thread Raw
In response to Using pgAdmin and pgAgent with Greenplum  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
List pgadmin-hackers
Roberts, Jon wrote:
> I've looked at this code all day long and tried many hacks to make it work
> with GP but there isn't a way.
>
> The easiest way I can think of to handle this with the least amount of
> change to the architecture is to add another column to pg_job.  Maybe a
> Boolean called jobcompleted.  Then create a view called vw_pg_job which
> executes the function pga_next_schedule that returns the jobnextrun value.

I'm not sure why you'd need the extra column, but there are some issues
with using a view to replace the nextrun column:

- pgAgent queries each job every minute to see if it needs to run. That
could lead to a lot of cpu being used on that rather nasty pl/pgsql
function.

- When we spec'ed pgAgent, it was decided that if a schedule were
missed, that instance should run immediately on startup. The proposed
change would prevent that behaviour, though personally I'm not sure
that's necessarily a bad thing.

- The 'Run Now' feature in pgAdmin would need to be reworked - perhaps
by adding a flag to pg_job to indicate the job should run once
regardless of scheduling.

The second are more minor issues, but the first doesn't seem at all good
to me.

Regards, Dave.


pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: [ANNOUNCE] pgAdmin III v1.8.0 Released
Next
From: "Roberts, Jon"
Date:
Subject: pgAgent bugs?