6

I have installed PostgreSQL 9.6 in win 10.

Also installed pgAgent for job scheduling.

I have create one job for batch file execute but it showing status 'r','i'. What is the meaning of status field.

I have attached screenshot. image link1 image link2

How can manage log in pgaAgent?

user619
  • 149
  • 2
  • 2
  • 13

1 Answers1

11

These are the statuses of pgAgent:

r running s success f failed i internal failure d aborted

Using pgAdmin you can check the logs by clicking on the step, then on the statistics panel, then you will see what the job "wrote" in the output column.

Jim Jones
  • 18,404
  • 3
  • 35
  • 44
  • but if job showing status with r and taking too much time then how can i resolve it. – user619 Mar 28 '18 at 13:14
  • It wasn't really your question, so please update it. But you can always kill your process if you suspect it's taking too long. You can do it either using the dashboard of pgAdmin or the console: (unix) `ps aux | grep pgagent` will give you an idea of what is going on. – Jim Jones Mar 28 '18 at 13:18
  • It not related to actual question but. i am facing this kind of problem.can you share below command for windows instead of unix. – user619 Mar 28 '18 at 13:26
  • In pgAdmin: can you see the running job when you go to `Dashboard` and click on `Sessions`? There you can kill it clicking on the black square icon just beside the process (stop). – Jim Jones Mar 28 '18 at 13:31
  • In that case, if possible, I would restart the whole pgagent process. I'm not very familiar with windows - I'v been using linux for the last 15 years. But I'd guess you can kill pgagent at the Windows Task Manager. I learned the hard way: it is always best to test the script before executing it on pgagent. It's just not very user friendly yet. – Jim Jones Mar 28 '18 at 13:45
  • hi, would you please help me answer this one:https://stackoverflow.com/questions/72966492/how-to-selected-the-first-n-rows-from-a-table – Amrmsmb Jul 13 '22 at 12:42