Skip site navigation (1) Skip section navigation (2)

Re: PGSVC : PostgreSQL Windows Service Manager

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <efesar(at)unm(dot)edu>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: PGSVC : PostgreSQL Windows Service Manager
Date: 2004-04-06 14:30:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
> > main distribution, it cannot rely on Borland C++ builder - 
> it has to 
> > compile with mingw. Since there is no other C++ code in postgresql, 
> > j...
> Actually, there's no C++; naming it was a due to old habits. 
> It should be compliant. Borland CBuilder comes with MinGW and 
> gcc, which compiled it fine (although the binary on the site 
> is Borland). Maybe we have different versions of MinGW? Can 
> you send your output? I will fix and retry. I also have a 
> separate MinGW install, to build PGSQL, and I will try that.

Haven't tried compiling it yet. But for start, there is //-comments,
which I don't think will pass a C compiler. Again, haven't specifically

Also, if we are going with an outside "service wrapper", consider
putting the install and uninstall functions into this one as parameters
"-install" etc. One less binary to worry about. 

I don't have your code around right now, so I don't remember if you had
already handled the "multiple instances on the same machine" issue. If
not, that would also be a nice feature :-)

> > Also, please note that GPL code is not compatible with the current 
> > postgresql license - check the archives for multiple discussions...
> Please tell me which license to pick. I know it will be hard 
> for you to allow me to relinquish my own control, but I'm 
> fine with that. Tell me which one to pick, and I'll be happy 
> to switch the license. :) For me, to you all, it's free, 
> whatever, beer, money, however that goes ... I don't have an 
> opinion! It's all free to me!

The rest of the backend is BSD, so that would be most suitable.

> > It should be quite possible to redirect these pipes using 
> the data in 
> > STARTUPINFO. I'm not sure how that will handle subprocesses execu...
> I redirected with STARTUPINFO by many methods (including 
> Microsoft's example), and it positively could not find the 
> sugar to redirect. The pipes were open, I could "read" (no 
> data, however), then they would close with this error: "The 
> pipe has ended." I tried with and without inheritance. I can 
> try to link PGSQL with a link switch called "-mwindows" 
> (which apparently disables the "DOS command window"), but I 
> have no idea where? On the linker, I presume, but I'm not 
> that well versed. Maybe the "console" is a "superprocess" to 
> the "postmaster.exe"? Just a thought ... ?
> As for subprocesses, I'm not that well versed. I'd prefer to 
> redirect stdout/stderr, if only to save my hairline. :)

Oh yes, but to catch the data, you need to get it from both the main
postmaster and from subprocesses.

'fraid I don't know much more about this - needs further research.


pgsql-hackers-win32 by date

Next:From: Merlin MoncureDate: 2004-04-06 19:21:24
Subject: Re: PGSVC : PostgreSQL Windows Service Manager
Previous:From: Keith WoodellDate: 2004-04-05 23:09:21
Subject: Re: PGSVC : PostgreSQL Windows Service Manager

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group