sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.61k stars 729 forks source link

pgweb container does not support Postgres 17 #756

Open mitchdenny opened 1 week ago

mitchdenny commented 1 week ago

Thanks for making pgweb. We are using it in the .NET Aspire team as one of the options for allowing developers targetting Postgres to be able to interactively inspect database state.

I was doing some testing in our upcoming .NET Aspire 9.0 release and I found that when I go to truncate a table that pgweb returns the following error:

{"error":"pg_dump version 16.4 not compatible with server version 17.0","status":400}

We are targetting a Postgres container running Postgres 17.0 (image tag) so I guess the error makes sense. Do you have any plans to upgrade to support Postgres 17?

sosedoff commented 1 day ago

Pgweb itself should be compatible, but for some features we're shelling out to pg_dump. In your case your server is running 1 major version ahead of your local tooling, which makes it incompatible.

I think the new docker release is needed in order to fix the error, see the details on how the pg tooling is installed: https://github.com/sosedoff/pgweb/blob/main/Dockerfile#L36-L40. I dont know off top of my head if debian:bullseye-slim will install the most recent version, but its easy to find out.

sosedoff commented 1 day ago

I just built the new image locally to see what pg_dump version is installed:

pgweb@c53cd8d2cb53:/$ pg_dump --version
pg_dump (PostgreSQL) 17.0 (Debian 17.0-1.pgdg110+1)

So yea, sounds like a new release should fix it.