Re: relocatable binary distribution

From: "Jim Wilson" <jimw(at)kelcomaine(dot)com>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: relocatable binary distribution
Date: 2004-03-05 13:02:40
Message-ID: twig.1078491760.12135@kelcomaine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Garamond said:

> I'm making a "relocatable" Postgres binary distribution for my clients.
> Everything goes into postgresql-7.4.1/ directory, including libraries
> and binaries. This will be installed by a non-privileged user under his
> own home directory. The goal is that they could just extract the
> tarball, adjust PATH if he wants, and then just run initdb + pg_ctl start.
>
> For binaries like bin/psql or bin/pg_vacuum that needs libpq.so, I've
> created a C wrapper that first sets LD_LIBRARY_PATH to a relative path
> (../lib/) and then exec() the real binary (moved to bin/psql.real or
> bin/pg_vacuum.real).
>
> However, it would be nice if $libdir could be relative to the binary
> too. Or if there were special token too like $HOME or $execdir or
> $datadir that can be used in PL declaration or in postgresql.conf:
>
> dynamic_library_path = '$execdir/../lib'
> unix_socket_directory = '$HOME/tmp' # or e.g. '$datadir/../tmp'
>
> Where $execdir is the path of the postmaster currently running, and
> $datadir is the current data directory (value of -D of postmaster/pg_ctl
> command).
>
> (Also, I'd appreciate if someone could explain how this 'relocatability'
> issue is/will be tackled on Win32 port).

It seems like you could handle all the above with just a shell script wrapper.
All three, the library path, socket directory, and data directory can be
specified either in environment or on the command line. Where are you getting
stuck?

Best,

Jim Wilson

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gellert, Andre 2004-03-05 13:45:59 Re: Are Postgres 7.4.1 RPMs available for SuSE 9.0 ?
Previous Message David Garamond 2004-03-05 11:44:19 relocatable binary distribution