Re: pg_ctl service integration for WIN32 - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: pg_ctl service integration for WIN32
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34BCE3@algol.sollentuna.se
Whole thread Raw
In response to pg_ctl service integration for WIN32  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: pg_ctl service integration for WIN32
List pgsql-patches
>
>Amended patch attached.
>Claudio


Hi!

Been testing this, and found a couple of small issues. Attached is a
patch that fixes these. (Note - Claudios patch is included in this one,
since it hasn't been applied yet..)

The issues:
1) When something goes bad, output went to stderr. No way to see that on
win32. Changed to put it to the eventlog when stderr is not a tty. This
also replaces the fprintf(stderr with write_stderr(, the same way my
backend patch does (updated version coming up soon).

2) Append ".exe" to the filename if that is not done automatically. It
wasn't done for me, but since other have had it running, it must work
sometimes... Without this, the service won't stard with an error stating
that there is no valid win32 executable availeble.

3) Prepend ".\" to the account name used to register the service, if no
domain is specified. Required for local domains, and makes it easier for
those not used to having to type .\ for local accounts..


Apart from those, looks good to me.

//Magnus



Attachment

pgsql-patches by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: ALTER TABLE ... SET TABLESPACE
Next
From: "Magnus Hagander"
Date:
Subject: Re: stderr & win32 admin check