Re: Binary installer

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Binary installer
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE2A6BEE@algol.sollentuna.se
обсуждение исходный текст
Ответ на Binary installer  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Список 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

В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: "Steve Tibbett"
Дата:
Сообщение: Re: Binary installer
Следующее
От: "Jochem van Dieten"
Дата:
Сообщение: Re: Binary installer