pgweb icon indicating copy to clipboard operation
pgweb copied to clipboard

Outdated Postgres version in contianer image

Open Davincible opened this issue 3 years ago • 3 comments

In #566 we discussed that using an older version of pg_export on new Postgres versions doesn't work and causes the SQL export functionality to break.

I just noticed that after your latest docker refactor, you switched from an alpine to Debian based image. One side effect of this is that the Debian package repo always works with older packages, causing Postgres 11 to be installed, while we're almost at v15.

To fix the issue as in #566 I recommend either manually installing Pg14 by adding the repo, or switching back to alpine. The downside of Debian is that you explicitly need to mark the version, while on alpine it will automatically install the latest.

So personally I'm in favor of an Alpine based image, but I'm not sure what your motivation was to switch to Debian in the first place.

What are your thoughts on this?

Davincible avatar Sep 24 '22 00:09 Davincible

Hey @Davincible my main motivation for switching to debian-based image was related to cross-compilation for different platform, in #568, if i recall correctly.

As for fixing the issue - i can def add pg14 into the docker image for the time being, as i'm not very happy with how the refactor turned out, however the export feature is not the most used one so its not that big of a deal. I feel your pain tho.

IMO being specific with pg client version during install is the best course of action.

sosedoff avatar Sep 24 '22 01:09 sosedoff

Also, adding a basic check before we invoke pg_dump will help diagnosing such problems.

sosedoff avatar Sep 24 '22 01:09 sosedoff

Adding in pg14 def sounds good.

Implementing a check would also be a very good addition, as now it just silently fails.

I find the SQL export function is nice to make quick manual backups out of a k8s cluster :)

Davincible avatar Sep 24 '22 01:09 Davincible

Thanks !

Davincible avatar Oct 25 '22 12:10 Davincible