Re: "1-Click" installer problems - Mailing list pgsql-general

From Craig Ringer
Subject Re: "1-Click" installer problems
Date
Msg-id 4BB44A1E.6010809@postnewspapers.com.au
Whole thread Raw
In response to Re: "1-Click" installer problems  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: "1-Click" installer problems  (Thomas Kellerer <spam_eater@gmx.net>)
Re: "1-Click" installer problems  (John R Pierce <pierce@hogranch.com>)
Re: "1-Click" installer problems  (Dave Page <dpage@pgadmin.org>)
Re: "1-Click" installer problems  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
Thomas Kellerer wrote:

> All the posts seem to share the same root cause: the data directory has
> been put into "c:\Program Files" but a regular user does not have write
> permissions on that directory.

Yep. They're also often confused by various steps people have tried
while attempting to get it working, making it very hard to trace what
actually happened initially and why.

> I do not like the installer's suggestion to put the data directory into
> c:\Program Files either, I think this should default to %APPDATA%

That seems fairly sensible *IF* it checks very carefully to make sure
the postgresql user does not have a roaming profile, ie they're a local
user not a domain user.

If the datadir was put in an account with roaming profiles enabled,
Windows would try to sync the datadir to and from the profile share on
the server at every user login/logout.

This could easily happen if the user overrode the usual account setup
and told the installer to just use their own account. So it needs to be
checked for and detected if %APPDATA% is to be used.

That said, C:\Users\postgresql\AppData\Local\Postgresql is indeed a very
good place to store the database.

> instead of %ProgramFile%. I bet half of the problems would go away if
> the installer refused to put the data directory into c:\Program Files.

Yep - it's not a clever place to put it.

> Given the fact that Microsoft finally tries to enforce people not to
> work as Administrators makes this even more important.

They also very strongly discourage storage of variable data in Program
Files. It's like Pg putting it's database in /usr/pgdata .

That said, on my Vista box (which has UAC fully enabled and on which Pg
runs as a normal user account) I had no problems with a default install
with datadir in program files. There's some other factor involved
causing this failure, such as a virus scanner or some funky option.

--
Craig Ringer

pgsql-general by date:

Previous
From: "Nikhil G. Daddikar"
Date:
Subject: Re: "1-Click" installer problems
Next
From: jose javier parra sanchez
Date:
Subject: Re: Re : Re : Re : Select in temporary table