Re: Deploy postgres - upgrade strategy

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Deploy postgres - upgrade strategy
Дата
Msg-id 476ACD22.5020300@postgresql.org
обсуждение исходный текст
Ответ на Re: Deploy postgres - upgrade strategy  ("Sean Z." <sean09182006@yahoo.com>)
Ответы Re: Deploy postgres - upgrade strategy  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
Список pgsql-general
Sean Z. wrote:
> BTW, what's the best way to determine the installation folder, port
> number used by an existing postgres server? From registry
> HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations ?

Yes. From a related doc I once wrote:

When PostgreSQL is installed on Windows it adds a number of entries to
the registry to allow pgAdmin and other applications to discover the
installation and make use of it automatically. This system is being used
further by the application stack builder project that I've been working on.

The following registry keys are added:

HKLM\Software\PostgreSQL\Installations\<Product Code>\Base Directory
HKLM\Software\PostgreSQL\Installations\<Product Code>\Data Directory
HKLM\Software\PostgreSQL\Installations\<Product Code>\Service ID
HKLM\Software\PostgreSQL\Installations\<Product Code>\Version

HKLM\Software\PostgreSQL\Services\<Service ID>\Data Directory
HKLM\Software\PostgreSQL\Services\<Service ID>\Database Superuser
HKLM\Software\PostgreSQL\Services\<Service ID>\Display Name
HKLM\Software\PostgreSQL\Services\<Service ID>\Encoding
HKLM\Software\PostgreSQL\Services\<Service ID>\Locale
HKLM\Software\PostgreSQL\Services\<Service ID>\Port
HKLM\Software\PostgreSQL\Services\<Service ID>\Product Code
HKLM\Software\PostgreSQL\Services\<Service ID>\Service Account

Where:

Product Code is the product code GUID used in the installer package.
This changes between major versions (ie. 8.1 -> 8.2).

Base directory is the base installation directory, eg. C:\PostgreSQL\8.1

Data directory is the data directory, eg. C:\PostgreSQL\8.1\data

Service ID is the identifier of the pg_ctl registration with the service
control manager, eg. pgsql-8.1

Version is the major.minor version, e.g. 8.1

Database superuser is the name of the initial superuser in the cluster,
eg. postgres

Display name is the friendly name of the pg_ctl registration with the
service control manager, eg. PostgreSQL Database Server (8.1)

Encoding is the database encoding set at initdb, eg. LATIN1

Locale is the server locale set at installation, eg. English_United Kingdom

Port is a DWORD value representing the port the server listens on, eg. 5432

Service account is the Windows user account that the pg_ctl service runs
under, eg. MYPC\postgres

The values are split into two sets of keys (with some duplication) to
allow easy cross-referencing from service to installation and vice
versa. Obviously <Product Code> and <Service ID> in the key paths should
be replaced with the actual values.


Regards, Dave.

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

Предыдущее
От: "Sean Z."
Дата:
Сообщение: Re: Deploy postgres - upgrade strategy
Следующее
От: mgainty@hotmail.com
Дата:
Сообщение: Re: Deploy postgres - upgrade strategy