Re: Customize the install directory of the postgres DB - Mailing list pgsql-general

From Tom Lane
Subject Re: Customize the install directory of the postgres DB
Date
Msg-id 10098.1258147797@sss.pgh.pa.us
Whole thread Raw
In response to Re: Customize the install directory of the postgres DB  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: Customize the install directory of the postgres DB  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-general
Greg Smith <greg@2ndquadrant.com> writes:
> weixiang tam wrote:
>> As we are bundling the postgresql db as our product release, we would
>> like to keep the Postgres executable dir, Data Dir under our product
>> folder. In this case, could I know whether I can customize the install
>> directory when i do the RPM installation?

> What you'd probably like to have here is what's called a relocatable
> RPM.  The RPMs provided for PostgreSQL are not relocatable.

Moving the data directory is not that hard, you just need to add a
config file that changes the PGDATA value seen by the init script.
The real problem that I think the OP hasn't considered is whether
his "bundled" RPM package isn't going to conflict with a preinstalled
postgresql RPM.  Relocating the RPM, either dynamically as you suggest
or by just changing the install paths while building it, isn't a very
palatable solution since e.g. you really want libpq.so in /usr/lib,
psql in /usr/bin/, etc.

            regards, tom lane

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Customize the install directory of the postgres DB
Next
From: Thomas Kellerer
Date:
Subject: Re: Customize the install directory of the postgres DB