Re: pg_config, pg_service.conf, postgresql.conf .... - Mailing list pgsql-hackers

From Dave Page
Subject Re: pg_config, pg_service.conf, postgresql.conf ....
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E40103E2F2@ratbert.vale-housing.co.uk
Whole thread Raw
In response to pg_config, pg_service.conf, postgresql.conf ....  ("Mark Woodward" <pgsql@mohawksoft.com>)
Responses Re: pg_config, pg_service.conf, postgresql.conf ....
List pgsql-hackers

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Mark Kirkwood
> Sent: 22 February 2006 01:53
> To: Mark Woodward
> Cc: Tom Lane; Peter Eisentraut; kleptog@svana.org;
> pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] pg_config, pg_service.conf,
> postgresql.conf ....
>
> I think you make a good point. However you probably need to
> include the
> location of the server software too (in case you run multiple
> versions).
> This means there really needs to be a standard location (e.g
> /usr/local/etc, /etc ...???? on win32) for this "cluster
> registration"
> file, and you need to list (at minimum):

pgInstaller actually already does this on Windows to help other apps
find the local installations.

In the registry, we have something like:

==================================================================
[HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations]

[HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\{34D95765-2D5A-470
F-A39F-BC9DEAAAF04F}]
"Base Directory"="C:\\Program Files\\PostgreSQL\\8.1\\"
"Data Directory"="C:\\Program Files\\PostgreSQL\\8.1\\data\\"
"Version"="8.1"
"Service ID"="pgsql-8.1"

[HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services]

[HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pgsql-8.1]
"Display Name"="PostgreSQL Database Server 8.1"
"Service Account"="PC30\\postgres"
"Data Directory"="C:\\Program Files\\PostgreSQL\\8.1\\data\\"
"Port"=dword:00001538
"Database Superuser"="postgres"
"Encoding"="SQL_ASCII"
"Locale"="C"
"Product Code"="{34D95765-2D5A-470F-A39F-BC9DEAAAF04F}"
==================================================================

As an example, pgAdmin uses this info to automatically register any
local installations.

Regards, Dave


pgsql-hackers by date:

Previous
From: Lukas Smith
Date:
Subject: Re: PostgreSQL unit tests
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_config, pg_service.conf, postgresql.conf ....