I've been working on getting PostgreSQL to run as an NT service. So
far I've been adding code that builds into postgres.exe, and causes a
new top-level service-management postgres process to run that in turn
forks the normal 'postmaster' process. This split is necessary
because of certain Cygwin constraints on use of signals and multiple
But the 'cgyrunsrv' application has recently become available,
providing a general wrapper capability for running any Cygwin process
as as service. I'm strongly considering using this wrapper to run
PostgreSQL rather than continuing with the approach of integrating the
service-management code right into postgres itself.
So, the question I put to this community is:
* Do you care whether we implement the NT-service mode of
PostgreSQL via the cygrunsrv wrapper vs. integrated code?
If so, why?
The way I see it, the main trade-offs are these:
Integrated service-management code:
+ Easy to add management features important to PostgreSQL
(mostly done already).
- Makes postgres.exe larger.
-- Adds new source code to pgsql that must be maintained, much
of it specific to arcane NT-service management policies.
- Requires changes to main() function in postgres.exe.
Separate cygrunsrv wrapper:
++ Might be possible to wrap postgres with no code changes to
PostgreSQL at all. (However, probably still need to ignore
SIGHUP in postmaster and postgres backend processes).
- Need to implement features in cygrunsrv that are specific
to only the PostgreSQL case so far. (dependency on other
services, specific signals to shutdown the application,
logging all output to a file, clean shutdown in event of NT
+ Do not need to maintain the NT-service management code in
- Requires PostgreSQL administrator to get and configure the
cygrunsrv application as well.
Fred Yankowski fred(at)OntoSys(dot)com tel: +1.630.879.1312
Principal Consultant www.OntoSys.com fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
pgsql-cygwin by date
|Next:||From: Tom Lane||Date: 2001-05-21 17:28:57|
|Subject: Re: [PORTS] NT service design choices |
|Previous:||From: Jason Tishler||Date: 2001-05-21 15:11:25|
|Subject: Re: Problems with Installing postgres on Cygwin|
pgsql-ports by date
|Next:||From: Tom Lane||Date: 2001-05-21 15:52:13|
|Subject: Re: Re: pgsql + qnx |
|Previous:||From: Peter Eisentraut||Date: 2001-05-21 14:59:14|
|Subject: Re: Re: pgsql + qnx|