Thread: Win32 sample service code

Win32 sample service code

From
"Ronald Kuczek"
Date:
Hello,
 
I have found Win32 service as todo item.
Maybe I can help ?
See attachment. I can add CriticalSection and other features if you need it.
 
Best regards
Rony
Attachment

Re: Win32 sample service code

From
"Magnus Hagander"
Date:
Hi!
This looks like a good starting point. I think the main issues with getting the service to run will be integrating it in the current backup startup, and handling signals so we do a nice shutdown.
 
It might be worthwhile to create a separate pgservice binary based on this work of yours that just spawns the postmaster. It will then have to use the postgresql win32 signalling code to shut the postmaster down upon service requests etc. That would keep a lot of cruft out of the postmaster itself. Thoughts on this? 
 
However, it still leaves you with the problem of dealing with settings management. But I think it's too early to speculate on exactly how that should be done, since we haven't decided on how to actually do it in standalone backends.
 
All in all, very good starting point, but I don't think we're quite ready to dot his yet - need to get the backend up and running in standalone first so we can decide what exactly the requirements are.
 
 
//Magnus
 
-----Original Message-----
From: Ronald Kuczek [mailto:kuczek@kuczek.pl]
Sent: Wednesday, February 04, 2004 8:14 PM
To: pgsql-hackers-win32
Subject: [pgsql-hackers-win32] Win32 sample service code

Hello,
 
I have found Win32 service as todo item.
Maybe I can help ?
See attachment. I can add CriticalSection and other features if you need it.
 
Best regards
Rony