Re: pgAgent STDERR and Time Zone Questions

From: Dave Page <dpage(at)pgadmin(dot)org>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: pgAgent STDERR and Time Zone Questions
Date: 2011-12-23 10:25:30
Message-ID: CA+OCxoxrJqOmA-Am9sBUiTsm1d7ds9dORM3x6OVwrnED0J_Uuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Thu, Dec 22, 2011 at 5:44 PM, David E. Wheeler <david(at)justatheory(dot)com> wrote:
> On Dec 22, 2011, at 1:44 AM, Dave Page wrote:
>
>> Which makes me think that either `rc`is not what gets put into jsresult, or that `steps->GetString(wxT("jstonerror"))` is returning "s", too. Or that I’m completely misunderstanding something, of course. :-)
>>
>> What's in pgagent.pga_jobstep where jstid in (1, 3, 7)?
>
> postgres=# select * from pgagent.pga_jobstep where jstid IN (1, 3, 7);
> -[ RECORD 1 ]--------------------------------------------------------------------------
> jstid      | 1
> jstjobid   | 1
> jstname    | Daily Liberation
> jstdesc    |
> jstenabled | t
> jstkind    | b
> jstcode    | analytics-datamart/bin/daily_liberator
> jstconnstr |
> jstdbname  |
> jstonerror | f
> jscnextrun | [null]
> -[ RECORD 2 ]--------------------------------------------------------------------------
> jstid      | 3
> jstjobid   | 2
> jstname    | Liberate subscriber_evid_override
> jstdesc    |
> jstenabled | t
> jstkind    | b
> jstcode    | analytics-datamart/bin/liberate_once proreporting subscriber_evid_override
> jstconnstr |
> jstdbname  |
> jstonerror | f
> jscnextrun | [null]
> -[ RECORD 3 ]--------------------------------------------------------------------------
> jstid      | 7
> jstjobid   | 4
> jstname    | Copy flat_evid_item
> jstdesc    |
> jstenabled | t
> jstkind    | b
> jstcode    | analytics-datamart/bin/liberate_once proreporting flat_evid_type
> jstconnstr |
> jstdbname  |
> jstonerror | f
> jscnextrun | [null]

Hmm, that looks like it should work. I've just run some tests here,
and can't find anything wrong. Successes are reported as such, and
non-zero return values are reported as whatever the "on error" setting
says they should be. Subsequent steps in a job are either processed or
skipped correctly based on the return value and on error setting of
the previous step(s).

postgres=# postgres=# select * from pgagent.pga_jobsteplog;
jslid | jsljlgid | jsljstid | jslstatus | jslresult |
jslstart | jslduration | jsloutput
-------+----------+----------+-----------+-----------+-------------------------------+-----------------+------------------------
1 | 1 | 1 | s | 127 | 2011-12-23
10:14:37.108296+00 | 00:00:00.182375 |
2 | 2 | 1 | s | 127 | 2011-12-23
10:15:02.155214+00 | 00:00:00.052011 |
3 | 3 | 1 | f | 127 | 2011-12-23
10:16:02.334791+00 | 00:00:00.0732 |
4 | 4 | 1 | f | 127 | 2011-12-23
10:17:02.514272+00 | 00:00:00.113905 |
5 | 5 | 1 | f | 127 | 2011-12-23
10:18:02.645482+00 | 00:00:00.087998 | This will be an error.
6 | 6 | 1 | f | 127 | 2011-12-23
10:19:02.780288+00 | 00:00:00.08348 | This will be an error.
7 | 7 | 1 | i | 127 | 2011-12-23
10:20:02.903824+00 | 00:00:00.201093 | This will be an error.
8 | 7 | 3 | s | 0 | 2011-12-23
10:20:03.106797+00 | 00:00:00.004515 | This will be a success
9 | 8 | 1 | i | 127 | 2011-12-23
10:21:03.088051+00 | 00:00:00.006627 | This will be an error.
10 | 8 | 3 | s | 0 | 2011-12-23
10:21:03.096869+00 | 00:00:00.006623 | This will be a success
(10 rows)

Is it possible you've got the config right now, but the logs you
posted were from a different config?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message David E. Wheeler 2011-12-23 16:47:58 Re: pgAgent STDERR and Time Zone Questions
Previous Message David E. Wheeler 2011-12-22 17:44:05 Re: pgAgent STDERR and Time Zone Questions