Re: pg_config, pg_service.conf, postgresql.conf ....

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Mark Kirkwood" <markir(at)paradise(dot)net(dot)nz>, "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <kleptog(at)svana(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_config, pg_service.conf, postgresql.conf ....
Date: 2006-02-22 08:06:58
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E40103E2F2@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Mark Kirkwood
> Sent: 22 February 2006 01:53
> To: Mark Woodward
> Cc: Tom Lane; Peter Eisentraut; kleptog(at)svana(dot)org;
> pgsql-hackers(at)postgresql(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-02-22 11:04:15 Re: pg_config, pg_service.conf, postgresql.conf ....
Previous Message Lukas Smith 2006-02-22 07:47:19 Re: PostgreSQL unit tests