Hi there,

 

I'm having an issue with pgAgent which I'm sure is related to this bug:

 

http://archives.postgresql.org/pgadmin-support/2007-11/msg00098.php

 

I'm on Solaris x86, using pgAdmin 1.8.0 (the latest available build for this
OS)

 

When I start pgagent, I get this error though:

 

DEBUG: Database sanity check

DEBUG: Clearing zombies

18:56:08: Error: Cannot get the hostname (error 0: Error 0)

DEBUG: Checking for jobs to run

 

 

I've looked through the source, and it's probably here that it's failing.

 

int MainRestartLoop(DBconn *serviceConn)

.

wxString hostname = wxGetFullHostName();

.

 

Any idea as to why the hostname is not being returned? This is the cause of
the problem, I think.

Essentially, the SQL being issued is this:

 

            SELECT J.jobid 

              FROM pgagent.pga_job J 

             WHERE jobenabled 

               AND jobagentid IS NULL 

               AND jobnextrun <= now() 

               AND jobhostagent = '' OR jobhostagent = ''

             ORDER BY jobnextrun

 

So it ALWAYS returns the jobs, regardless of whether they're enabled or not.
Hence, they run at every single poll!

 

Many thanks

Andy Tilley

 

 

Reply via email to