dbTalk Databases Forums  

[BUGS] Errors should go to the Windows event log

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Errors should go to the Windows event log in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aled Morris
 
Posts: n/a

Default [BUGS] Errors should go to the Windows event log - 08-13-2004 , 12:50 PM






When pg_ctl fails to start postmaster, an event should be logged
containing the reason. This information is available on the command
line, so it should be possible to use the Windows event log.

Here is what I did:

I installed PostgreSQL 8.0 beta 1 on Windows XP Pro, using the installer
from the PGInstaller project.

I didn't run any tests, but was able to run pgadmin, and connect to the
template1 database. I left the service running and set to automatically
start.

A couple of days later, the service is not running. In
programs->administrative tools->service, I right click and select "start
service". The following message box is shown: "The PostgreSQL database
server 8.0-beta1 service on Local Computer started and then stopped.
Some services stop automatically if they have no work to do, for
example, the Performance Logs and Alerts service."

There are three events in the event log: "The PostgreSQL Database Server
8.0-beta1 service was successfully sent a start control.", "The
PostgreSQL Database Server 8.0-beta1 service entered the running state."
and "The PostgreSQL Database Server 8.0-beta1 service entered the
stopped state.", all within one second of each other.

I start a cmd window as user postgres ("runas /userostgres cmd"), and
in the new cmd window, run "C:\Program
Files\PostgreSQL\8.0-beta1\bin\pg_ctl.exe" start
-D "C:\Program Files\PostgreSQL\8.0-beta1\data\"

The output is:

pg_ctl.exe: Another postmaster may be running. Trying to start
postmaster anyway
..
FATAL: lock file "C:/Program
Files/PostgreSQL/8.0-beta1/data/postmaster.pid" already exists
HINT: Is another postmaster (PID 1024) running in data directory
"C:/Program Files/PostgreSQL/8.0-beta1/data"?
pg_ctl.exe: cannot start postmaster
Examine the log output

So it seems that the database crashed in some way, and left a lockfile,
causing a fatal error when the database was next started. This error
should end up in the Windows event log.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.