Re: As a Linux distro, how to package multiple postgres major versions?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: As a Linux distro, how to package multiple postgres major versions?
Date: 2021-11-25 19:50:07
Message-ID: ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/25/21 10:43 AM, Chocimier wrote:
> Hi,
>
> How to provide Postgres for a binary rolling release Linux distribution?
> Currently 9.6, 12 and 13 major versions are packaged in Void by me in
> way described below.
> No one reported practical problems with that, but some concerns arised,
> mainly around shared libraries.
>
> Constraints:
> - Want to allow to migrate data to new version of server.
> - Other software (postfix, qt5...) is linked dynamically to libpq.so,
> and providing variants of those per postgres version is not desired.
> - There are extensions provided (currently only postgis, more planned).
>
> Current model is:
> - Provide different major versions as packages installable at same
> time, except from postgresql-libs (libpq, libpgtypes, libecpg.so).
> Build every major version _N_ with different prefix: usr/lib/psqlN.

The Debian PostgreSQL Maintainers has a separate tree for each major
version.  They *do not* rename the binaries.

$ dir /usr/lib/postgresql/
total 8
drwxr-xr-x 4 root root 4096 2020-11-18 09:22:00 12/
drwxr-xr-x 4 root root 4096 2019-05-24 13:46:12 9.6/

postgres(at)haggis:~$ dir /usr/lib/postgresql/12
total 16
drwxr-xr-x 2 root root  4096 2021-09-08 00:43:11 bin/
drwxr-xr-x 4 root root 12288 2021-09-08 00:43:11 lib/

$ dir /usr/lib/postgresql/9.6
total 16
drwxr-xr-x 2 root root  4096 2021-09-08 00:43:13 bin/
drwxr-xr-x 3 root root 12288 2021-09-08 00:43:13 lib/

> This allows usage of pg_upgrade to migrate data.
> - Have one user-installable shared libraries package, always from
> newest available version.
> - Provide extensions for every version as different package built
> against target postgres version (e.g. postgis-postgresql12).
> - Do not rebuild packages depending on libpq.so when library is updated.
> - Rebuild packages depending on libpq.so against newest version when
> they are updated.
> - Upgrade of postgresql-libs does not force people to install and use
> newer server, this is done independently whenever they decide to.
>
> Now, my questions:
> - Is loading new major version library from old postgresql server,
> client, extension valid?
> - Is loading new major version library from package build against *old*
> major version to talk to old server valid?
> - Is loading new major version library from package build against *new*
> major version to talk to old server valid?
> - If any of above is wrong, what could be better model?
>
>

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurent FAILLIE 2021-11-25 20:17:38 Re: As a Linux distro, how to package multiple postgres major versions?
Previous Message Osvaldo Kussama 2021-11-25 18:52:14 Re: function difference not found