Fixed directory locations in installs - Mailing list pgsql-hackers

From Bruce Momjian
Subject Fixed directory locations in installs
Date
Msg-id 200405021154.i42BsVi27929@candle.pha.pa.us
Whole thread Raw
Responses Re: Fixed directory locations in installs  (Peter Eisentraut <peter_e@gmx.net>)
Re: Fixed directory locations in installs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
I have been looking at our use of fixed directory specifications in
binaries.

Right now we have libdir (dynamic_library_path) predefined in the
compile, with a GUC to override it.  initdb also needs to be able to
find its input files, and that can be overridden by an initdb flag.

Adding the timezone database, backends now need to know where /share is,
not just initdb.  Seems we need a new GUC variable for that too.

Also, Win32 installs are going to want to be more directory independent
than Unix.

Right now if we move /lib or (or in the future /share) we need to edit
postgresql.conf.  Is there an easier way to do this?  Should initdb be
setting libdir and sharedir in GUC, rather than leave these as
compiled-in defaults?

Because Win32 can probe for the location of the binary, it seems it
should check to see if it can find libdir and sharedir own its own and
set those GUC values accordingly as part of initdb.

Basically I am sugesting that initdb set these defaults as GUC
variables, rather than having the backend use compiled-in defaults, and
Win32 can also use the binary location to find them and set the GUC
values.

In other words:
#dynamic_library_path = '$libdir'

could maybe become:
#dynamic_library_path = '/usr/local/pgsql/lib'

and if it doesn't match the default, the comment is removed:
dynamic_library_path = '/usr/local/pgsql/lib'

initdb would make these adjustments.  Same for sharedir.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Timezone database questions
Next
From: "Magnus Hagander"
Date:
Subject: Re: [pgsql-hackers-win32] Timezone database questions