pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: As a Linux distro, how to package multiple postgres major versions?
Date: Thu, 25 Nov 2021 13:50:07 -0600
Message-ID: <ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com> (raw)
In-Reply-To: <d64abbca-182e-d648-ffbc-57ed27c57bf6@tlen.pl>
References: <d64abbca-182e-d648-ffbc-57ed27c57bf6@tlen.pl>

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@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.

view thread (5+ messages)  latest in thread

Message-ID: <ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com>
Permalink:  ../ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com/
Also on:    postgresql.org/message-id/ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: As a Linux distro, how to package multiple postgres major versions?
  In-Reply-To: <ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com>
  References: <d64abbca-182e-d648-ffbc-57ed27c57bf6@tlen.pl> <ea54731d-02d2-75c5-cff3-c2bc27d93450@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox