docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.2k stars 1.14k forks source link

Different dependencies installed for PG13 s390x, mips64le vs amd64, arm64, ppc64le (has some to PG14 rel. packages) #956

Open Dexus opened 2 years ago

Dexus commented 2 years ago

When I running:

on amd64, arm64, ppc64le

docker run --platform=linux/amd64 -ti --rm postgres:13-bullseye bash -c "dpkg -l | grep -i postgresql"
Status: Downloaded newer image for postgres:13-bullseye
ii  libpq5:amd64              14.2-1.pgdg110+1             amd64        PostgreSQL C client library
ii  pgdg-keyring              2018.2                       all          keyring for apt.postgresql.org
ii  postgresql-13             13.6-1.pgdg110+1             amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-client-13      13.6-1.pgdg110+1             amd64        front-end programs for PostgreSQL 13
ii  postgresql-client-common  238.pgdg110+1                all          manager for multiple PostgreSQL client versions
ii  postgresql-common         238.pgdg110+1                all          PostgreSQL database-cluster manager

on s390x and mips64le it looks like

docker run --platform=linux/s390x -ti --rm postgres:13-bullseye bash -c "dpkg -l | grep -i postgresql"
ii  libpq5:s390x              13.6-1.pgdg110+1             s390x        PostgreSQL C client library
ii  pgdg-keyring              2018.2                       all          keyring for apt.postgresql.org
ii  postgresql-13             13.6-1.pgdg110+1             s390x        The World's Most Advanced Open Source Relational Database
ii  postgresql-client-13      13.6-1.pgdg110+1             s390x        front-end programs for PostgreSQL 13
ii  postgresql-client-common  238.pgdg110+1                all          manager for multiple PostgreSQL client versions
ii  postgresql-common         238.pgdg110+1                all          PostgreSQL database-cluster manager

Does this make problems? libpq5:amd64 14.2-1.pgdg110+1 != libpq5:s390x 13.6-1.pgdg110+1

I don't want to try it!

I would expect not to have any postgres14 dependencies for the postgres 13 images

wglambert commented 2 years ago

Upstream only has a handful of officially built architectures https://github.com/docker-library/postgres/blob/e483778176ca34bcbe83ee17000820d4f6e64c28/13/bullseye/Dockerfile#L98-L101

Architectures not on the list are built from source https://github.com/docker-library/postgres/blob/e483778176ca34bcbe83ee17000820d4f6e64c28/13/bullseye/Dockerfile#L106-L108

tianon commented 2 years ago

I'm more concerned by the s390x image getting an older version of libpq than I am by the amd64 image getting a newer one -- we're installing these directly from the PostgreSQL repositories in the way that they recommend, and I haven't ever seen a compatibility issue with having "too new" of a libpq instance.

tianon commented 2 years ago

Ah, we're building libpq5 as part of postgresql-XX, so we'd have to do a lot of extra work to build a newer version on these architectures -- https://github.com/docker-library/postgres/pull/800#issuecomment-748195107 is also very relevant.

Dexus commented 2 years ago

Who guarantees me that the compatibility between both versions is really permanently given? Although it says on the postgesql website that it should be so, but we all know that such a thing is not 100% guaranteed. Know I build all source new, to have the packages and created my own apt repo. But this is not the ideal way I think.