On Fri, Apr 18, 2014 at 5:21 PM, MauMau <maumau...@gmail.com> wrote:
> From: "Amit Kapila" <amit.kapil...@gmail.com>
>> Currently -e option is accepted with all the options that can be provided
>> in pg_ctl.  Shouldn't we accept it only with options related to service,
>> because that is only when it will be used.  Basically write_stderr() will
>> write to event log only incase of service.
> Thank you for your kind and patient review.  I hope this will bear fruit.
> I don't find it so strange that -e is accepted by all operation modes of
> pg_ctl --- pg_ctl seems to handle switches that way.  For example, -c is
> only relevant to start and restart, but it is accepted by all modes.  -D is
> not relevant to pg_ctl kill, but it is not rejected.  Plus, I prepared for
> the future possibility that other modes of pg_ctl will use event log.

Okay, as there is no check for not-required switches with other options,
we can ignore this as well.

I have verified the patch and it works fine on Windows, as per my
verification event-source in pg_ctl will be only used once the user has
registered the service and then when it tries to preform start/stop on
service.  Although current usecase seems to be quite narrow for a new
switch, however in future we can extend it to use for other messages
in pg_ctl as well.

Only one minor suggestion:
+        Name of the event source for pg_ctl to use for event log.  The
+        default is PostgreSQL.

From this description, it is not clear when the event log will be used
in pg_ctl.  For example, if user uses -e option with register, then he
might expect any failure during register command will be logged into
eventlog, but that is not true.  So I think we should improve the docs
to reflect the usage of -e.

On Linux, I am getting below build failure for pg_ctl

pg_ctl.c: In function ‘main’:
pg_ctl.c:2173: error: ‘event_source’ undeclared (first use in this function)
pg_ctl.c:2173: error: (Each undeclared identifier is reported only once
pg_ctl.c:2173: error: for each function it appears in.)
make[3]: *** [pg_ctl.o] Error 1
make[2]: *** [all-pg_ctl-recurse] Error 2
make[1]: *** [all-bin-recurse] Error 2
make: *** [all-src-recurse] Error 2

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to