Re: Manual installation of PostgreSQL 8

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "frank church" <pgsql(at)adontendev(dot)net>, "John DeSoi" <desoi(at)pgedit(dot)com>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Manual installation of PostgreSQL 8
Date: 2005-07-20 16:33:49
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C779F@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

> I tried a few more times, and realised that the postgres user
> rights to the data folder were not being set properly in
> cygwin. So I tried an initdb on a postgres user folder, and
> that failed because of some /dev/null error related to recent
> changes in cygwin.dll.

Note that the cygwin version is a completely different product from the
native win32 version. I would strongly advice you not to run them on the
same machine.
(And personally I wouldn't run the cygwin version at all now that the
native one exists, but I realise there may be reasons when you have to)

> I think what is more important for the pginstaller group is
> probably a specification of the necessary conditions required
> for all the various steps of the installation and
> configuration to succeed, the steps required and how they can
> be implemented, and examples of how they can be implemented
> in various scripting languages. I am sure that a general
> purpose language could have spotted that the postmaster
> service existed and was configured differently and warned me
> at that stage.

The installer looks for other installations of the native win32 version.
It also looks for cygwin products in the PATH, and warns you to remove
them. It also checks that the TCP/IP port you chose to use is not in use
(which it would be if you had a conflicting cygwin version already
installed). I'm not sure what else you want us to check?

The installer supports silent installs. There are a couple of things
(notably the creation of the service account) that can't be scripted
inside the installer ATM. But the documentation clearly states what the
requirements are on this account. How you do it is of course dependent
of your scripting language, but creating an account and assigning it a
right is not complicated. THe same for setting filesystem permissions.
What more exactly do you need documetnation for?

> From them on people could implement their own installers in
> any general purpose scripting language, whether WSH, bash, or
> even the DOS batch language, or even install from the command
> prompt by hand.

The required documentation to do it by hand is available. It's the same
requirements as unix, except you have to translate paths and permissions
to windows. The only other difference is you have to register it as a
service, vs on unix you put it in /etc/rc.d.

> I realised for instance that in the cygwin installation the
> xcacls program can probably configure the
> /var/postgresql/data folder for the postgres user in a short
> sequence of commands, if not just one.

Again, the cygwin installation is a completely different product. The
native version does just this - it sets the correct permissions on the
directories you install it in.
Last time I checked many parts of cygwin (and certainly not just
postgresql) wasn't really geared towards a modern windows box where you
actually use permissions and aren't always an admin.

> I think the pginstaller group should reconsider the policy of
> installing the service user under a separate account.

This is not a questino for pginstaller. The backend *will not start*
when running as an admin user.
We could add support for "network service" on Windows 2003 though -
might be worth looking at that for 8.1.

> It is understandable that the Unix world does not believe in giving
> naive end users enough rope to hang themselves with,

People in the windows world are finally starting to realise this as
well. Including Microsoft. They are pushing *heavily* for people not to
use admin for services, and not to use admin accotns to log in. Just
look at what they're doing for Longhorn...
And this is not just naive end users, this includes highly experienced
administrators as well.

> ut some of these issues can harm the advocacy of PostgreSQL in the
> Windows world. It doesn't seem to have hurt MySQL or Firebird
> - at least make it an option.

Really? Then how come the remote-exec vulns we've seen in MySQL lately
have given people complete control over the server, whereas similar
vulns on postgresql could only hurt the database? And how come serious
database vendors on windows (read: at least microsoft) strongly advise
you *not* to use local system for the server?

Search the archives for discussions about this. Bottom line - not going
to happen. It is *not* difficult to create a service user. If you can't
do that, you will hit a lot of other problems if you are going to run a
database server. And heck, the installer will even do it for you! The
tiny gain just isn't worth the increas in risk.

> PS. Is the a list of instructions I can use to install the
> raw precompiled binaries

No, not curerntly. There are instructions for source and for MSI only.

//Magnus

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Jason Long 2005-07-20 16:36:42 Re: Manual installation of PostgreSQL 8
Previous Message Andrew Dunstan 2005-07-20 16:25:25 Re: Manual installation of PostgreSQL 8