Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: pgagent status always successful





On 5/7/06 19:34, "Eric Shuman" <erics(at)ameri-title(dot)com> wrote:

> Hi Dave,
> 
> I think I got the patch installed via Raphaël's instructions.  I seem to now
> get a result code for my step, but the status for the step and job is still
> "successful".  Also, the result code returned is not the same as the exit code
> for the script (is it supposed to be???).
>

Hi Eric,

If the script can be executed successfully (ie. It was created and run on
the host machine by pgAgent), then the result status code will be whatever
is returned by the pclose() call the corresponds to the popen() used to
execute the script.

If pgAgent cannot run the script (because it can't create a temporary
directory and file for example), it will return -1.

So, if you're seeing a -1 return value, run pgAgent with the log level set
to show at least warnings and you should see an error message if pgAgent is
having trouble. Otherwise, see 'man 3 pclose' which should tell you what
your system's pclose does.

As for failing the job, do you have 'On Error' set to 'Fail' for that step?

Regards, Dave.

PS. I'm off to the PostgreSQL conference in Toronto tomorrow so might not be
around much for the next week or so.




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group