Re: Windows installation service - Mailing list pgsql-hackers

From Dann Corbit
Subject Re: Windows installation service
Date
Msg-id D425483C2C5C9F49B5B7A41F8944154702962146@postal.corporate.connx.com
Whole thread Raw
In response to Re: Windows installation service  (Dave Page <dpage@pgadmin.org>)
Responses Re: Windows installation service
List pgsql-hackers
> -----Original Message-----
> From: Dave Page [mailto:dpage@pgadmin.org]
> Sent: Friday, April 10, 2009 1:58 PM
> To: Dann Corbit
> Cc: pgsql-hackers@postgresql.org; Bill Luton; Larry McGhaw; Mike
McKee;
> Brian Fifer
> Subject: Re: [HACKERS] Windows installation service
>
> On Fri, Apr 10, 2009 at 8:29 PM, Dann Corbit <DCorbit@connx.com>
wrote:
>
> > I don't know the reason why, but that is not what happens here.
> >
> > We see the problem on 64-bit machines with Windows 2008 Server.
> > We see the problem on 32-bit machine with Windows 2003 Server.
> > We see the problem on 32-bit Windows XP machines.
> > It is universal (all of these machines demonstrate the problem).
> >
> > I did get this email from Mike McKee this morning:
> >
> > "I noticed a pattern.
> >
> > The first time it works, and can shutdown.
> >
> > The second time is where it kind of hangs ...."
>
> So what is unusual about your machines that makes this happen for you,
> but apparently noone else we've heard of? Are you running on a domain?

Yes.  This is a corporation, so we don't run peer to peer.

> Any nonstandard security policy or other configuration?

Nothing unusual.

> I know Connx have experience developing on Windows, so can one of you
> attach a debugger and see why the WaitForMultipleObjects() call in
> pg_ctl doesn't work on your systems?

Here is what we tried:

We decided to start the service from the command line as an executable
rather than a service.

First, we found permissions problems:

C:\CONNX32\CONNXSTORE\bin>C:\CONNX32\CONNXSTORE\bin\pg_ctl.exe start -w
-N "pgsql-8.3" -D "C:\CONNX32\CONNXSTORE\data\"
waiting for server to start...2009-04-10 14:55:22 PDT LOG:  loaded
library "$libdir/plugins/plugin_debugger.dll"
2009-04-10 14:55:22 PDT PANIC:  could not open control file
"global/pg_control": Permission denied

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
............................................................could not
start server

We allowed user postgres to have full control for the global folder.

C:\CONNX32\CONNXSTORE\bin>C:\CONNX32\CONNXSTORE\bin\pg_ctl.exe start -w
-N "pgsql-8.3" -D "C:\CONNX32\CONNXSTORE\data\"
waiting for server to start...2009-04-10 15:09:50 PDT LOG:  loaded
library "$libdir/plugins/plugin_debugger.dll"
2009-04-10 15:09:50 PDT LOG:  could not create file "postmaster.opts":
Permission denied
................... done
server started

We had a similar problem with the data folder, so we changed permissions
for user postgres to have full control for the data folder.

C:\CONNX32\CONNXSTORE\bin>C:\CONNX32\CONNXSTORE\bin\pg_ctl.exe start -w
-N "pgsql-8.3" -D "C:\CONNX32\CONNXSTORE\data\"
waiting for server to start...2009-04-10 15:19:49 PDT LOG:  loaded
library "$libdir/plugins/plugin_debugger.dll"
............................................................could not
start server

After those changes, we no longer had permissions problems but the
server did not start from the command line.

I uninstalled Postgresql

I removed the postgres user

I removed the postgres directory structure

I installed PostgreSQL postgresql-8.3.7-1.

Apparently this version does not have the same bad symptoms (I have not
checked all the other machines yet -- that will take some time).



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: pg_restore dependencies
Next
From: Tom Lane
Date:
Subject: Re: pg_restore dependencies