Re: plan for running postmaster directly as NT service - Mailing list pgsql-hackers

From Tom Lane
Subject Re: plan for running postmaster directly as NT service
Date
Msg-id 21816.980611390@sss.pgh.pa.us
Whole thread Raw
In response to plan for running postmaster directly as NT service  (Fred Yankowski <fred@ontosys.com>)
List pgsql-hackers
Fred Yankowski <fred@ontosys.com> writes:
> a) The 'install' and 'remove' code is quite bulky, although simple.
> Is it OK to create a new source file for it, rather than working it
> into some existing file?

I think this'd be a lot easier to sell (and probably to implement)
if the NT-specific stuff is a separate, arm's-length wrapper around
the standard Unix version.  Possibly you want something that replaces
src/backend/main/main.c in an NT build.

> b) How can the service log error messages?  Is there any syslog type
> facility?

Syslog support exists.  There's still a lot of debugging-type code that
scribbles to stderr, but (at least for a first cut) you could just let
that go to the bit bucket.

> c) What is a good way for the supervisory thread to communicate with
> the main thread and shut it down cleanly?

Send it an appropriate signal, same as pg_ctl does.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: RE: plan for running postmaster directly as NT service
Next
From: Tom Lane
Date:
Subject: Re: Ungraceful handling of fatal flex errors