From: "Tom Lane" <t...@sss.pgh.pa.us>
I'm still not clear on why we can't just use the port number.
It will be possible to use port to set the default value of event_source GUC when starting postmaster. But using port during event source registration will involve much more. To use port, we have to tell the location of $PGDATA to regsvr32.exe. However, regsvr32.exe can only take an argument from /i, and we are using /i for event source name specification. If we want to pass data directory, we have to change the usage. Instead, we could probably have regsvr32.exe check PGDATA env variable and invoke "postgres -C event_source", but that would require much more complicated code (e.g. for locating postgres.exe, because regsvr32.exe is in Windows directory)
Anyway, the point of my patch is to just make pg_ctl use event_source GUC for outputing to event log. I want to rely on postgres -C, because pg_ctl already uses it for retrieving data_directory GUC. I'd like to avoid further complication in code and discussion. If you request, I can revert the default value of event_source and regsvr32.exe /i to "PostgreSQL". I'm okay with that, because syslog_ident also has the default value "postgres", which doesn't contain the major release.
Any (not complicated) suggestions? Regards MauMau -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers