I started writing this after struggling and Googling for hours and not
getting anywhere. I'm running EnterpriseDB 9.1.2.2 64-bit on Windows 7
64-bit. I installed pgAdmin separately, version 1.14.1. The database
appears to be working fine. pgAgent was automatically installed and the
service starts without error. I see the pgAgent in the Catalog list,
and Jobs shows in the postgres database.
I'm logged in as user postgres in the postgres database. I created the
following table:
CREATE TABLE datetest
( datestamp timestamp without time zone
)
and populated a single row:
insert into datetest values(sysdate);
I then created a simple test job, of type SQL, with the following
definition:
update datetest set datestamp = sysdate
I scheduled this to run every 5 minutes. When I started this email, the
job just wouldn't run when I said Run Now, and no errors showed up in
the event log. I finally remembered from somewhere that Host agent has
to be empty; sure enough, I removed "localhost" from there and then my
job ran :(.
So, now the only remaining issue is that in PgAdmin, the Statistics tab
shows all runs with a status of "Failed". But the datetest table is
getting updated properly. I see no events in the Application event log. Finally, I ran pgAgent from the command line
inDEBUG mode:
DEBUG: Checking for jobs to run
DEBUG: Creating job thread for job 2
DEBUG: Creating DB connection: user=postgres port=5432
hostaddr=127.0.0.1 password=xxxx dbname=postgres
DEBUG: Allocating new connection to database postgres
DEBUG: Starting job: 2
DEBUG: Sleeping...
DEBUG: Creating DB connection: user=postgres port=5432
hostaddr=127.0.0.1 password=xxxx dbname=postgres dbname=postgres
DEBUG: Allocating new connection to database postgres
DEBUG: Executing SQL step 3 (part of job 2)
DEBUG: Returning connection to database postgres
DEBUG: Returning connection to database postgres
DEBUG: Completed job: 2
DEBUG: Destroying job thread for job 2
DEBUG: Checking for jobs to run
DEBUG: Sleeping...
The run also shows a status of "Failed". Any idea why? Thanks.
--
Guy Rouillier