Proposal to fix postgresql package maintainance nightmare

Baptiste Daroussin bapt at FreeBSD.org
Tue Jul 21 09:46:33 UTC 2015


Hi,

We do manage a bunch of postgresql servers on FreeBSD, and I really find the
current model of packages postgresql is a nightmare on FreeBSD.

Let's first start with the current issues.
- Impossible to have tools from both old and new version at the same time (which
  is necessary to upgrade db and prepare upgrades of db)
- Impossible to chose the version we want to run in production without having to
  rebuild the packages and the whole ports tree with a specific default.
- Nightmare each time a new default version is set in the ports tree.

Here is my proposal to fix that.

Having one single postgresql-client package always on the latest stable version
(backward compability being very good) providing the client cli tools and the
libraries (those libraries will be used for everything in the ports tree
needing to talk to postgresql)

Have one full postgresql package per supported version upstream self installing
itself into let's say: /usr/local/postgresql94 and symlinks all the client tools
to /usr/local/bin suffixed by the version psql94 pg_bla94 etc.

That way everything talk to pgsql will only depend on one postgresql-client
packages that will smoothly be upgraded to newer versions.

All database administrators will have the ability to chose the production
version they do want without having to worry about a default version.

They can install multiple version in parallel and deal with upgrade the way they
want having access to both versions of the tools of the same time.

Any opinion on that change? Any idea one how to make the upgrade path as
transparent as possible for current setup? (beside of course adding an UPDATING
entry)

Note that the upgrade path will be quite easy a simple pkg upgrade will propose
to upgrade postgresql94-server and propose to remove postgresql94-client (which
won't be needed anymore) and if anything on the machine is linked to libpq
postgresql-client (the new one) will be automatically pulled.

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20150721/c7748447/attachment.bin>


More information about the freebsd-ports mailing list