On Thu, Jun 28, 2012 at 7:21 AM, Yelai, Ramkumar IN BLR STS <ramkumar.ye...@siemens.com> wrote: > Hi Dave, > > I use to shutdown the postgresql server by stopping the service, followed by > that pgAgent server is automatically stopped. > > However I am getting the following error message in service logger, while > shutdown server. > > Postgresql Service error message > > The description for Event ID ( 0 ) in Source ( PostgreSQL ) cannot be found. > The local computer may not have the necessary registry information or message > DLL files to display messages from a remote computer. You may be able to use > the /AUXSOURCE= flag to retrieve this description; see Help and Support for > details. The following information is part of the event: FATAL: terminating > connection due to administrator command > > Pgadmin error message > > Failed to query jobs table! > > The PostgreSQL Scheduling Agent - pgAgent service terminated unexpectedly. > It has done this 7 time(s). > > It looks like pgAgent is not properly shutdown as you said.
Well that's what happened this time - you killed the database underneath it which it doesn't particularly like. That's not quite the issue I was describing though; I was saying that the only time the agent resets the nextrun time at startup is if it gets shutdown when the job is running (which can be because the database server dies underneath it, or the agent itself is shutdown). That results in a "zombie", ie. a job which is assigned to an agent that's no longer running. We really have no choice but to reset in that case because it's safer not to re-run a job that may have partially completed, than to run it and potentially damage data. This way, the user can manually cleanup any fallout from the partially completed job. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support