Re: [bug fix] pg_ctl always uses the same event source - Mailing list pgsql-hackers

From MauMau
Subject Re: [bug fix] pg_ctl always uses the same event source
Date
Msg-id 21C197C32FEC4A128BF8E665E725E3E4@maumau
Whole thread Raw
In response to Re: [bug fix] pg_ctl always uses the same event source  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [bug fix] pg_ctl always uses the same event source
List pgsql-hackers
From: "Tom Lane" <tgl@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




pgsql-hackers by date:

Previous
From: Emre Hasegeli
Date:
Subject: Re: GiST support for inet datatypes
Next
From: Tom Lane
Date:
Subject: Re: [bug fix] pg_ctl always uses the same event source