pg_dump version mismatch
Description
Tried to execute a database backup with PostgreSQL 18 as database server. But pg_dump stopped because of a mismatch of the versions. Looks like the included pd_dump version in the bbs agent is 17.
Following error message was thrown: Backup completed, but 1 plugin(s) failed: pg_dump (Paperless Database) failed: pg_dump failed for paperless: pg_dump: error: aborting because of server version mismatch pg_dump: detail: server version: 18.6 (Debian 18.6-1.pgdg13+2); pg_dump version: 17.11 (Debian 17.11-0+deb13u1)
Steps to Reproduce
Install PostgreSQL 18. Setup Backup plan with plugin for database PostgreSQL dump. Run backup plan.
Used application: Paperless-ngx:latest Installation type: Docker (Paperless and BBS)
Installation Type
Docker
BBS Version
v2.91.3
Agent Version (if applicable)
v2.90.0
Agent OS (if applicable)
Ubuntu / Debian
Relevant Logs
Backup completed, but 1 plugin(s) failed: pg_dump (Paperless Database) failed: pg_dump failed for paperless: pg_dump: error: aborting because of server version mismatch
pg_dump: detail: server version: 18.6 (Debian 18.6-1.pgdg13+2); pg_dump version: 17.11 (Debian 17.11-0+deb13u1)
Fixed on main, in the next release. Two parts:
- The agent now asks the server its version and uses the matching
pg_dumpwhen one is installed (/usr/lib/postgresql/<major>/binon Debian and Ubuntu,/usr/pgsql-<major>/binon RHEL, the Homebrew and EDB layouts on macOS), falling back topg_dumpon PATH. A mismatch error now says which client package to install. - The agent Docker image installs clients 16, 17 and 18 from the PostgreSQL apt repository instead of Debian's single version, so a PostgreSQL 18 server dumps with pg_dump 18. That lands with the next agent image build.
For a bare-metal agent the same rule applies: install postgresql-client-18 from the PostgreSQL apt repository beside the existing one and the agent picks it up. Thanks for the report.
Thank you. Very nice for this quick response.
But does this mean, that PostgreSQL14 will not be able to be backup now with the new bbs-release? At the moment, I backup successfully immich with PostgreSQL14, which is still the official recommended version.
@marcpope: I see in the dockerfile of the Agent that really only postgresql-client-16 postgresql-client-17 postgresql-client-18 \ are installed/added. I would requests to add also v14 and v15, because they are still supported. V13 and older have reached their eol.