win32 service proposal

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: win32 service proposal
Date: 2004-05-03 10:01:52
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F438@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


[For review only. Not for committing.]

Decided to take a crack at this in the interests of knocking over the
remaining TODO win32 items asap.

Would appreciate any comments on the code, particularly from win32 people.
An obvious missing feature is allowing the service to be registered under a
user account, something we certainly need to allow (with this service
running under SYSTEM, I've already tripped over some permission issues in
the regression tests).

A consensus also needs to reached on whether or not to include this in the
postmaster: Do we want the win32 service in the postmaster, or a
stand-alone exe? (currently hooks into the main.c with a one-liner, but
trivial to wrap as a stand-alone exe).

Spoke about this off-list with Magnus; he's strongly for stand-alone; I'm
fence-sitting. We see that clearly there are some niceties to having this in
the postmaster (one less exe to build/configure; same install set for
win/*nix; etc), but the downsides include minor impact on the core code and
the fact that a user will see two postmaster processes running... the latter
I find particularly obnoxious (using a thread to handle the service or
PostmasterMain would alleviate this, but would require more work to be able
to catch postmaster shutdowns, meaning impact to core code, and unexpected
terminations would leave the user at the mercy of the Service Manager).

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Attachment Content-Type Size
service.c application/octet-stream 6.6 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2004-05-03 10:17:49 Re: win32 service proposal
Previous Message Magnus Hagander 2004-05-03 07:54:18 Re: win32: whitespace in dir names, shmem bug