Fixed directory locations in installs

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Fixed directory locations in installs
Date: 2004-05-02 11:54:31
Message-ID: 200405021154.i42BsVi27929@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2004-05-02 11:55:42 Re: Timezone database questions
Previous Message Bruce Momjian 2004-05-02 11:11:49 Timezone database questions