Re: Relocatable installs - Mailing list pgsql-hackers

From Shachar Shemesh
Subject Re: Relocatable installs
Date
Msg-id 409DB996.2030506@shemesh.biz
Whole thread Raw
In response to Re: Relocatable installs  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:

>Shachar Shemesh wrote:
>  
>
>>Bruce Momjian wrote:
>>
>>    
>>
>>>Comments?
>>> 
>>>
>>>      
>>>
>>What's wrong with the way it's done by everybody else?
>>
>>Have hardcoded paths (determined at configure time), and allow override 
>>using a config file. Have a command line option for saying where the 
>>config file should be.
>>    
>>
>
>Where do we put the config file so it can be found?  We can't assume
>root privilege to write into /etc.
>  
>
Put it in /etc (or wherever else user said in configure). Allow a 
command line parameter that says "run the server with this config file 
instead". User can place override config file wherever she damn wishes.

>>For Windows, replace config file with "Registry". That is usually 
>>hardcoded for (depending on whether you want it changeable per-user) 
>>HKEY_LOCAL_MACHINE\Software\<company name>\<product name> (replace HKLM 
>>with HKEY_LOCAL_USER if you want per-user config).
>>    
>>
>
>Doesn't registry require admin privilege on the Windows box?
>  
>
HKLM does. HKCU doesn't. Actually, HKLM often doesn't either, but that's 
a rant I won't start right now.

Again, you can use command-line arguments to override, if you want. 
Alternatively, Postgres can look at HKCU, and if not found there, at 
HKLM. This means that there can be a system-wide default, overrideable 
per user by each user. The only reason I'm suggesting this (as it is 
unlikely that for production installs more than one user will be running 
postgres) is that editing user keys for other users is a task I'm not 
sure many admins know how to do. It requires the use of the 
not-well-known "regedt32" rather than "regedit", and involves loading 
the correct file into the registry "hive". As such, placing stuff in 
HKLM allows admins to easilly edit it. If that is not an issue, I'd say 
"place it at HKCU".
         Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting
http://www.lingnu.com/



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Relocatable installs
Next
From: Marc Slemko
Date:
Subject: Re: Relocatable installs