Re: How to Build Postgres in a Portable / Relocatable fashion?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AJ ONeal <coolaj86(at)proton(dot)me>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to Build Postgres in a Portable / Relocatable fashion?
Date: 2024-05-03 23:44:54
Message-ID: 2770930.1714779894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

AJ ONeal <coolaj86(at)proton(dot)me> writes:
> What I want to create (and provide) is a portable tarball that has
> most of all what it needs in the tarball and will look for relevant
> libraries relative to itself.

See

https://www.postgresql.org/docs/current/installation.html

particularly the discussion of installation relocatability under

https://www.postgresql.org/docs/current/install-make.html#CONFIGURE-OPTIONS-LOCATIONS

In short, you have to specify an installation path, but as long
as you don't muck with the relative locations of the subdirectories
it should be possible to move the whole tree to a different
installation location.

> Something that Just Works™ *almost* anywhere (Ubuntu, Debian, RedHat, Suse... maybe even Alpine).

That's a little harder, mainly because the shared libraries for
dependencies like openssl etc may not be 100% compatible across
all those platforms. Different versions, different build options,
yadda yadda.

Maybe you should be thinking in terms of a docker container
or the like?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2024-05-04 00:07:57 Re: How to Build Postgres in a Portable / Relocatable fashion?
Previous Message AJ ONeal 2024-05-03 23:27:12 Re: How to Build Postgres in a Portable / Relocatable fashion?