From: | Dave Page <dpage(at)postgresql(dot)org> |
---|---|
To: | "Sean Z(dot)" <sean09182006(at)yahoo(dot)com> |
Cc: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Deploy postgres - upgrade strategy |
Date: | 2007-12-20 20:14:26 |
Message-ID: | 476ACD22.5020300@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Armin Massa | 2007-12-20 21:00:48 | Re: Deploy postgres - upgrade strategy |
Previous Message | mgainty | 2007-12-20 20:13:13 | Re: Deploy postgres - upgrade strategy |