Re: [bug fix] pg_ctl always uses the same event source

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] pg_ctl always uses the same event source
Date: 2014-01-23 22:41:38
Message-ID: 21C197C32FEC4A128BF8E665E725E3E4@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-23 22:52:40 Re: [bug fix] pg_ctl always uses the same event source
Previous Message Emre Hasegeli 2014-01-23 22:22:56 Re: GiST support for inet datatypes