Re: [PATCHES] stderr & win32 admin check

2004-06-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > Attached is the updated version of this patch, which now includes proper > testing for win32 service running. This is tested and verified with > Claudios service wrapper pg_ctl patch (including the parts I added and > sent in a short while ago). Appl

Re: [PATCHES] stderr & win32 admin check

2004-06-20 Thread Magnus Hagander
ne; [EMAIL PROTECTED] >Subject: Re: [PATCHES] stderr & win32 admin check > > > >I am confused. There are no hooks to call this function right now. Is >it called by Claudio's patch? > >--- > > &g

Re: [PATCHES] stderr & win32 admin check

2004-06-20 Thread Bruce Momjian
rom: Magnus Hagander > >Sent: den 19 juni 2004 13:55 > >To: Bruce Momjian > >Cc: Tom Lane; [EMAIL PROTECTED] > >Subject: Re: [PATCHES] stderr & win32 admin check > > > > > >I plan to resubmit this patch shortly (hopefully during the weekend) > >inc

Re: [PATCHES] stderr & win32 admin check

2004-06-20 Thread Magnus Hagander
>-Original Message- >From: Magnus Hagander >Sent: den 19 juni 2004 13:55 >To: Bruce Momjian >Cc: Tom Lane; [EMAIL PROTECTED] >Subject: Re: [PATCHES] stderr & win32 admin check > > >I plan to resubmit this patch shortly (hopefully during the weekend) >including s

Re: [PATCHES] stderr & win32 admin check

2004-06-19 Thread Magnus Hagander
I plan to resubmit this patch shortly (hopefully during the weekend) including supprot for detecting if running as a service (and thus pick eventlog support). From what I can tell, the rest should be Ok to go, so expect a new one shortly. //Magnus >-Original Message- >From: Bruce Momjian

Re: [PATCHES] stderr & win32 admin check

2004-06-18 Thread Bruce Momjian
Magnus, where are we on this refactoring process. --- Magnus Hagander wrote: > >> * Created function write_stderr(const char *fmt, ...), used > >before elog > >> can be used. This function will write to stderr on unix and o

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Claudio Natoli
> At least I don't htink it's in what Claudio has so far - Claudio? Lots > of work to get into your framework? The original patch I submitted actually *required* a service name, allowing any number of postgres installations. I have no intention of removing that. Cheers, Claudio --- Certain dis

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Bruce Momjian
Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> So? I don't follow why "run it as a service" isn't a sufficient answer, > >> and indeed the preferred way to do it. > > > We don't know what the usage pattern is going to be on Windows - I think > > we need to

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Bruce Momjian
Dave Page wrote: > > -Original Message- > From: Matthew T. O'Connor [mailto:[EMAIL PROTECTED] > Sent: Tue 6/15/2004 4:06 PM > To: Dave Page > Cc: Tom Lane; Magnus Hagander; [EMAIL PROTECTED] > Subject: Re: [PATCHES] stderr & win32 admin check > >

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Magnus Hagander
>>>It hasn't been discussed, but it would be fairly trivial to >>>add this to the service installer. (A bit more work on the MSI >>>installer, but we could do with that one just installing the >>>default instance at least for starters). >> >> Correcting myself on this one - the MSI installer alread

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Andrew Dunstan
Tom Lane said: > Andrew Dunstan <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> So? I don't follow why "run it as a service" isn't a sufficient >>> answer, and indeed the preferred way to do it. > >> We don't know what the usage pattern is going to be on Windows - I >> think we need to keep it

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Andrew Dunstan
Magnus Hagander said: >>It hasn't been discussed, but it would be fairly trivial to >>add this to the service installer. (A bit more work on the MSI >>installer, but we could do with that one just installing the >>default instance at least for starters). > > Correcting myself on this one - the MSI

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Magnus Hagander
>It hasn't been discussed, but it would be fairly trivial to >add this to the service installer. (A bit more work on the MSI >installer, but we could do with that one just installing the >default instance at least for starters). Correcting myself on this one - the MSI installer already supports

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Magnus Hagander
>> If you mean only run one instance of postmaster as service, >> that's not true. >> If you like two pgsql servers (i.e. db clusters), you can >> install two services, both using the same binary with >> different cmd line arguments. > >In which case, what would 'net stop postgresql' do? What yo

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
> -Original Message- > From: Andreas Pflug [mailto:[EMAIL PROTECTED] > Sent: 15 June 2004 22:28 > To: Dave Page > Cc: Tom Lane; [EMAIL PROTECTED] > Subject: Re: [PATCHES] stderr & win32 admin check > > Dave Page wrote: > > > > > &g

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Andreas Pflug
Dave Page wrote: you can only run one instance as a service on a single machine. If you mean only run one instance of postmaster as service, that's not true. If you like two pgsql servers (i.e. db clusters), you can install two services, both using the same binary with different cmd line argume

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> So? I don't follow why "run it as a service" isn't a sufficient answer, >> and indeed the preferred way to do it. > We don't know what the usage pattern is going to be on Windows - I think > we need to keep it as flexible as possibl

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Tom Lane
"Dave Page" <[EMAIL PROTECTED]> writes: >> So? I don't follow why "run it as a service" isn't a >> sufficient answer, and indeed the preferred way to do it. > It is the preferred method, however two reasons not to spring to mind: > first, I bet you and most others on this list might not want to

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 15 June 2004 19:11 > To: Dave Page > Cc: Magnus Hagander; [EMAIL PROTECTED] > Subject: Re: [PATCHES] stderr & win32 admin check > > So? I don't follow why "run it as a serv

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Andrew Dunstan
Tom Lane wrote: "Dave Page" <[EMAIL PROTECTED]> writes: Well, that's kinda the point. If you are a hacker who has local admin privs (not exactly unusual on Windows networks - in some cases Power User group membership is required to run legacy software), you *cannot* run PostgreSQL except as a se

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Tom Lane
"Dave Page" <[EMAIL PROTECTED]> writes: > Well, that's kinda the point. If you are a hacker who has local admin > privs (not exactly unusual on Windows networks - in some cases Power > User group membership is required to run legacy software), you *cannot* > run PostgreSQL except as a service, thus

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Andreas Pflug
Dave Page wrote: It could still be run on NT4 under the following conditions: 1) Running as a service 2) Running if the user logged in is not an administrator. Well, isn't "running as a service" sufficient? I thought that was the only interesting case for non-hackers anyway. As long as y

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
-Original Message- From: Matthew T. O'Connor [mailto:[EMAIL PROTECTED] Sent: Tue 6/15/2004 4:06 PM To: Dave Page Cc: Tom Lane; Magnus Hagander; [EMAIL PROTECTED] Subject: Re: [PATCHES] stderr & win32 admin check > I have been working on integrating pg_autovacuum into the ba

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Matthew T. O'Connor
Dave Page wrote: Personally I don't care as I use XP/2K3 anyway, but having been told my autovacuum service code needed to support NT4 I have been working on integrating pg_autovacuum into the backend, and I have it working, I'm just trying to clean up some lose ends before I submit another p

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 15 June 2004 14:58 > To: Magnus Hagander > Cc: Dave Page; [EMAIL PROTECTED] > Subject: Re: [PATCHES] stderr & win32 admin check > > "Magnus Hagander" <[EMAIL PROTECTED]&g

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> "Can't run Postgres securely" would be a more-than-sufficient >> reason not to support NT4, IMHO. > It could still be run on NT4 under the following conditions: > 1) Running as a service > 2) Running if the user logged in is not an administrator.

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Magnus Hagander
> > This will prevent PostgreSQL being runable on NT4 by anyone > with admin > > privileges, except as a service. > > Are we actually supporting NT4? I recall quite a bit of > discussion long ago about which versions of Windows were > really reasonable to support, but I don't recall if there

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Tom Lane
"Dave Page" <[EMAIL PROTECTED]> writes: > This will prevent PostgreSQL being runable on NT4 by anyone with admin > privileges, except as a service. Are we actually supporting NT4? I recall quite a bit of discussion long ago about which versions of Windows were really reasonable to support, but I

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
> -Original Message- > From: Magnus Hagander [mailto:[EMAIL PROTECTED] > Sent: 15 June 2004 09:16 > To: Dave Page; [EMAIL PROTECTED] > Subject: RE: [PATCHES] stderr & win32 admin check > > > > > > Oh, and I notice the use of the PowerUsers g

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Magnus Hagander
> Oh, and I notice the use of the PowerUsers group - iirc, > there is no such group on NT4 domains, so the attempt to get > the SID will fail. That is one weird NT4.. :-) First of all, "Power Users" is not a domain group, it is a local group. It has nothing to do with your domain. As such,

Re: [PATCHES] stderr & win32 admin check

2004-06-15 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Magnus Hagander > Sent: 14 June 2004 21:49 > To: [EMAIL PROTECTED] > Subject: [PATCHES] stderr & win32 admin check > > The patch makes the "if user is ad

Re: [PATCHES] stderr & win32 admin check

2004-06-14 Thread Magnus Hagander
>> * Created function write_stderr(const char *fmt, ...), used >before elog >> can be used. This function will write to stderr on unix and on win32 >> fconsole. It will write to the eventlog on win32 when running as a >> service. >> * Changed all (most? I think I got all) fprintf(stderr,...) >to

Re: [PATCHES] stderr & win32 admin check

2004-06-14 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > * Created function write_stderr(const char *fmt, ...), used before elog > can be used. This function will write to stderr on unix and on win32 > fconsole. It will write to the eventlog on win32 when running as a > service. > * Changed all (most? I thi

[PATCHES] stderr & win32 admin check

2004-06-14 Thread Magnus Hagander
Per previous patch, win32 required the check for admin privs to be moved from main.c into postmaster.c, because elog was not available at this time. While working on fixing that all the way (moving the unix one as well), I realised this wasn't good, and did it this way instead: * Created function