PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail

From: Guy Rouillier <guyr(at)burntmail(dot)com>
To: PgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail
Date: 2012-02-29 07:39:30
Message-ID: 4F4DD632.90304@burntmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

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 in DEBUG 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

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2012-02-29 09:13:17 Re: PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail
Previous Message Charles Gutjahr 2012-02-29 00:22:13 Likely bug in executing pgScript on wrong database