Several PostgreSQL versions installed

Baptiste Daroussin bapt at FreeBSD.org
Thu May 25 20:06:09 UTC 2017


On Thu, May 25, 2017 at 09:59:08PM +0200, José García Juanino wrote:
> Hi FreeBSD porters,
> 
> 
> I have been read the following thread
> 
> "Proposal to fix postgresql package maintainance nightmare"
> 
> https://lists.freebsd.org/pipermail/freebsd-ports/2015-July/099842.html
> 
> but I think that, two years later, there is no progress on this matter.
> I am unaware if there is any project that addresses this issue, so my
> apologies if this work is already in progress.

No progress as far as I am aware. except a PoC (early, ugly, unfinished)
https://people.freebsd.org/~bapt/pgsql95.diff

> 
> The goal of the new postgresql port schema should be, in my honest
> opinion:
> 
> * It must allow to install distinct version without ugly hacks as jails,
>   etc. Jails are a overkill to accomplish this task.
> 
> * Each software version must live in a separate directory
> ${LOCALBASE}/pgsql/X.Y:
> 
>     /usr/local/pgsql/9.2
>     /usr/local/pgsql/9.4
>     /usr/local/pgsql/9.6
> 
>   and so on.

Yes this is what I was proposing
> 
> 
> * It is not necessary to provide an installed version as the default.
>   For example, if we need 9.5 and 9.6 versions installed, both are
>   equally valid, and we do not need the standard postgresql binaries
>   (pg_dump, psql, pg_ctl, etc) installed in the standard PATH as
>   /bin:/usr/bin:/usr/local/bin.  Those binaries are located under
>   /usr/local/pgsql/X.Y/bin directory, and everyone can configure the
>   shell environment variable PATH to add the previous directory:
>   PATH=$PATH:/usr/local/pgsql/X.Y/bin. Please do not make symlinks from
>   /usr/local/bin/pg_some to specific /usr/local/pgsql/X.Y/bin/pg_some,
>   it has very little advantages and a lot of drawbacks. Under a prompt
>   command line, a skilled database administrator always need to know
>   what command version is executing and do not need an standard location
>   as /usr/local/bin.

For a database administrator yes playing with the path is enough, but for a new
comer installing pgsql for his blog this would be complicated
> 
> 
> * The rc and the periodic script must be versioned also:
> 
>     /usr/local/etc/rc.d/postgresql9.6
>     /usr/local/etc/rc.d/postgresql5.6
> 
yes

One important thing is there is a need for a small modification for the
postgresql build system: add a proper RUNPATH for the binaries to always find
the right libpq

> 
> 
> Best regards, and thanks to the volunteers for make FreeBSD an great
> operating system!
> 

Note that the same should apply to mysql/mariadb/etc

bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170525/afcc0407/attachment.sig>


More information about the freebsd-ports mailing list