Harald Armin Massa wrote:
> PostgreSQL 8.1.5 and 8.2.1
> 
> both on W2K3, installed from the standard win32 msi installer.
> 
> Problem:
> 
> in postgresql.conf
> 
> ssl=on
> 
> but the files server.key etc. are NOT present.
> 
> Result: PostgreSQL service does not start. And no error message in any
> log I could access: nothing in the Windows Event Log, nothing in the
> pg_log (not even starts a file)
> 
> [in this case it was me doing the SSL-setup, missing to copy the key
> files; BUT... they could get deleted / made inaccessible a later time,
> and THEN it get's impossible to diagnose the problem]
> 
> Proposed solution:
> write an error message to pg_log/ or windows event log on missing
> ssl-server-key-files.


I took a quick look at this, and it's certainly correct. If I change the
log_destination to be eventlog, it works and logs the proper error message.

This may show a much bigger problem. When we have set redirect_stderr
(which is what the MSI installer does by default), what happens to
everything that is logged *before* SysLogger_Start()? There are a lot of
startup things that happen then, but where does the output go?

I'm thinking we need a check in elog.c on the:
                if ((!Redirect_stderr || am_syslogger) && pgwin32_is_service())
                        write_eventlog(edata->elevel, buf.data);


line, that checks if the syslogger process has been started yet. So it'd
 be something like
if ((!Redirect_stderr || am_syslogger || syslogger_not_started_yet) &&
pgwin32_is_service())


Does that seem reasonable? Or am I looking at this the wrong way?

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to