Re: Binary installer

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Steve Tibbett" <stibbett(at)zim(dot)biz>, "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>, "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "pgsql-hackers-win32 " <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Binary installer
Date: 2004-01-23 14:27:23
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE2A6BEE@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

> Gotta disagree with you there.. a good Windows app won't use
> the environment at all. Take a look at the environment of a
> typical Windows server - the various services don't have any
> environment variables related to them, it's all in the registry.

Agreed on that.
There is also another thing to consider there - it can be a lot of work
influencing the environment for a service, unless you start the service
with a BAT file (with a wrapper around). And a wrapper around a wrapper
around the postmaster doesn't seem so good :-)

This is all because the environment is per-user. While there is also a
per-machine environment, you really shouldn't put service config in
there. And modifying the environment for a *different* requires logging
in as that user.

The registry is the way to do it on Win32 today (but large data amounts
should of course be in a file referenced from the registry). .Net aims
to replace it with XML config files, but the registry is still
extensively used there.

> Writing something into HKEY_LOCAL_MACHINE\Software\PostgreSQL
> that says where Postgres is installed would be reasonable..
> at startup the Win32 code could simply read that variable
> from the registry and set it into the environment so the rest
> of postgres can depend on it being in the environment.

Considering the environment is really nice when you run it from the
commandline, it should probably use the environment variable *if set*.
But *if not*, it should load it from the registry.

Also, I'd much rather see
HKLM\System\CurrentControlSet\Services\<pgservice>. That way, you can
have multiple services installed on the same machine without them
affecting each other. You will also automatically get the "protection"
of the "Last Known Good Configuration" boot, which will roll back the
CurrentControlSet subtree.

//Magnus

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Jochem van Dieten 2004-01-23 14:37:48 Re: Binary installer
Previous Message Steve Tibbett 2004-01-23 14:17:57 Re: Binary installer