Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B58DB64FDCB for ; Fri, 24 Oct 2008 17:42:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18779-09 for ; Fri, 24 Oct 2008 17:42:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by postgresql.org (Postfix) with ESMTP id D0CFA64FD96 for ; Fri, 24 Oct 2008 17:42:25 -0300 (ADT) Received: by ey-out-2122.google.com with SMTP id 6so423451eyi.61 for ; Fri, 24 Oct 2008 13:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=fNsg7nIe0fGrJQQ9hUNUlhG/YnxnY9ltkQFTdYHWJ0w=; b=IphYm5MRU5jlRGp+Cg5Yy9j15V+WfTJgLJNt3Or0+AX3RJKk4rmmwIVs13yOhVBhVB Hh6C+1ZXcBfqYJTrztkMbDoU364ZN3G7Dx3fnmcUn4D/tEkChMuhnj97eow86S2psaYP rDUx4qlqy5+sEndyZKquGYGb43dTzBi3PDPuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=iGgvM7BnbvD1ZQoJMhiM7eeHwGJ4NsDO+kAk8XaFEAskwt0ajjRKoGmVyX5eb7jEl6 JxbFA6GlmSxEiiUwPnMltnTgtTfmXLs43OF29NyWeNaBwyd5uG9OjFQBrBk47ktTuIkV kencQGy0OXH2C60alNovSCFe6TBQ1lXkFWWSU= Received: by 10.210.47.1 with SMTP id u1mr2857282ebu.189.1224880943531; Fri, 24 Oct 2008 13:42:23 -0700 (PDT) Received: by 10.210.134.13 with HTTP; Fri, 24 Oct 2008 13:42:23 -0700 (PDT) Message-ID: Date: Fri, 24 Oct 2008 14:42:23 -0600 From: "Robert Young" To: pgsql-admin@postgresql.org Subject: pgadmin not processing scheduled jobs MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12803_21740217.1224880943519" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.903 tagged_above=0 required=5 tests=FB_WORD1_END_DOLLAR=1, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, URIBL_RHS_DOB=0.901 X-Spam-Level: * X-Archive-Number: 200810/161 X-Sequence-Number: 30617 ------=_Part_12803_21740217.1224880943519 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've ran the pgagent.sql script against my database. I've started the pgagent as you can see... 501 3107 1219 0 0:00.06 ttys000 0:00.12 pgagent -f -l 2 host=localhost dbname=mydb user=myuser pgagent output shows... laptop:~ ryoung$ pgagent -f -l 2 host=localhost dbname=mydb user=myuser DEBUG: Creating primary connection DEBUG: Creating DB connection: host=localhost dbname=mydb user=myuser DEBUG: Database sanity check DEBUG: Clearing zombies DEBUG: Checking for jobs to run DEBUG: Sleeping... DEBUG: Clearing inactive connections DEBUG: Connection stats: total - 1, free - 0, deleted - 0 DEBUG: Checking for jobs to run DEBUG: Sleeping... DEBUG: Clearing inactive connections DEBUG: Connection stats: total - 1, free - 0, deleted - 0 DEBUG: Checking for jobs to run DEBUG: Sleeping... DEBUG: Clearing inactive connections ........ as you can see, no jobs to run are found. here is the pgagent.pga_job table. Notice that the jobagentid is null as well as the joblastrun field. mydb=# select * from pgagent.pga_job; jobid | jobjclid | jobname | jobdesc | jobhostagent | jobenabled | jobcreated | jobchanged | jobagentid | jobnextrun | joblastrun -------+----------+---------+---------+--------------+------------+------------------------------+------------------------------+------------+-------------------------------+------------ 1 | 1 | test | | 127.0.0.1 | t | 2008-10-24 11:04:40.86785-06 | 2008-10-24 11:04:40.86785-06 | | 2008-10-24 12:56:49.378361-06 | here is the output from the pgagent.pga_jobagent table. As you can see, the agent is set in this table. mydb=# select * from pgagent.pga_jobagent; jagpid | jaglogintime | jagstation --------+-------------------------------+------------------------- 3108 | 2008-10-24 12:55:26.271553-06 | laptop.movenetworks.com pgagent.pga_schedule table output. mydb=# select * from pgagent.pga_schedule; jscid | jscjobid | jscname | jscdesc | jscenabled | jscstart | jscend | jscminutes | jschours | jscweekdays | jscmonthdays | jscmonths -------+----------+---------+---------+------------+------------------------+--------+---------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------+-----------------+-------------------------------------------------------------------+--------------------------- 1 | 1 | 1 | | t | 2008-10-24 11:05:00-06 | | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f} (1 row) pgagent.pga_step table output. mydb=# select * from pgagent.pga_jobstep; jstid | jstjobid | jstname | jstdesc | jstenabled | jstkind | jstcode | jstdbname | jstonerror | jscnextrun -------+----------+---------+---------------------+------------+---------+----------------------------------------+-----------+------------+------------ 1 | 1 | 1 | 2008-10-15 00:00:00 | t | s | update db_version set push_dt = now(); | mydb | f | Everything looks accurate to me. If I click on the 'run now' link in pgadmin3 it updates the date on the job table, but it still finds no jobs to run. Any help would be appreciated. Thanks ------=_Part_12803_21740217.1224880943519 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I've ran the pgagent.sql script against my database.  I've sta= rted the pgagent as you can see...

  501  3107  1219&= nbsp;  0   0:00.06 ttys000    0:00.12 pgagent= -f -l 2 host=3Dlocalhost dbname=3Dmydb user=3Dmyuser

pgagent output shows...

laptop:~ ryoung$ pgagent -f -l 2 host=3Dloca= lhost dbname=3Dmydb user=3Dmyuser
DEBUG: Creating primary connection
= DEBUG: Creating DB connection: host=3Dlocalhost dbname=3Dmydb user=3Dmyuser=
DEBUG: Database sanity check
DEBUG: Clearing zombies
DEBUG: Checking for jobs to run
DEBUG: Sleepi= ng...
DEBUG: Clearing inactive connections
DEBUG: Connection stats: t= otal - 1, free - 0, deleted - 0
DEBUG: Checking for jobs to run
DEBUG= : Sleeping...
DEBUG: Clearing inactive connections
DEBUG: Connection stats: total - 1,= free - 0, deleted - 0
DEBUG: Checking for jobs to run
DEBUG: Sleepin= g...
DEBUG: Clearing inactive connections
........

as you can = see, no jobs to run are found.

here is the pgagent.pga_job table.  Notice that the jobagentid is = null as well as the joblastrun field.

mydb=3D# select * from pgagent= .pga_job;
 jobid | jobjclid | jobname | jobdesc | jobhostagent | jo= benabled |          jobcreated=           |   &= nbsp;      jobchanged     = ;     | jobagentid |      = ;    jobnextrun       &nb= sp;   | joblastrun
-------+----------+---------+---------+--------------+------------+--------= ----------------------+------------------------------+------------+--------= -----------------------+------------
     1 | &= nbsp;      1 | test    |  = ;       | 127.0.= 0.1    | t       &nbs= p;  | 2008-10-24 11:04:40.86785-06 | 2008-10-24 11:04:40.86785-06 |&nb= sp;           | 2008-10-2= 4 12:56:49.378361-06 |


here is the output from the pgagent.pga_jobagent table.  As yo= u can see, the agent is set in this table.

mydb=3D# select * from pg= agent.pga_jobagent;
 jagpid |      &n= bsp;  jaglogintime        &nbs= p; |       jagstation    =    
--------+-------------------------------+-------------------------
 = ;  3108 | 2008-10-24 12:55:26.271553-06 | laptop.movenetworks.com

pgagent.pga_schedule tabl= e output.

mydb=3D# select * from pgagent.pga_schedule;
 jscid | jscjobid = | jscname | jscdesc | jscenabled |       = ; jscstart        | jscend |  =             &nb= sp;            =             &nb= sp;            =     jscminutes       &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           | &n= bsp;            = ;       jschours     = ;            &n= bsp;    |   jscweekdays   |  &= nbsp;           &nbs= p;            jscmon= thdays           &nb= sp;            =     |         jscmon= ths        
-------+----------+---------+---------+------------+-----------------------= -+--------+----------------------------------------------------------------= -----------------------------------------------------------+---------------= ------------------------------------+-----------------+--------------------= -----------------------------------------------+---------------------------=
     1 |        1 | = 1       |      =    | t          | 20= 08-10-24 11:05:00-06 |        | {f,f,f,f= ,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,= f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f= ,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,= f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f}
(1 row)


pgagent.pga_step table output.

mydb=3D# select * = from pgagent.pga_jobstep;
 jstid | jstjobid | jstname |  =      jstdesc       | jste= nabled | jstkind |         &nb= sp;      jstcode     &nbs= p;           | jstdbname = | jstonerror | jscnextrun
-------+----------+---------+---------------------+------------+---------+-= ---------------------------------------+-----------+------------+----------= --
     1 |       = ; 1 | 1       | 2008-10-15 00:00:00 | t =          | s    = ;   | update db_version set push_dt =3D now(); | mydb   = ; | f          |

Everything looks accurate to me.  If I click on the 'run now&#= 39; link in pgadmin3 it updates the date on the job table, but it still fin= ds no jobs to run.

Any help would be appreciated.

Thanks
<= br>


------=_Part_12803_21740217.1224880943519--