You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I encounter the same problem. I think it's because the psql client version installed on the odoo image is 9.x while db is 10.x
When I connect to the odoo bash, psql -V return 9.6.10 while db return 10.6.
And when I try to dump, I get this error in the odoo output:
2019-01-08 16:06:03,107 1 INFO odoo odoo.service.db: DUMP DB: odoo format dump
pg_dump: server version: 10.6 (Debian 10.6-1.pgdg90+1); pg_dump version: 9.6.10
pg_dump: aborting because of server version mismatch
This seems to be an ongoing issue with the odoo docker images @manuscle and as far as I'm aware, the general response from odoo is manually patch it yourself.
Hi, it's fixed here
and was merged in docker hub here
As already explained, if the psql client used to create the backup is from a postgres version smaller than the postgres server, it may fail. The latest dockers images, for any Odoo version, now uses the latest postgres psql client to create backups.
So the best thing to do is using the latest Docker image.
Activity
otech-nl commentedon Dec 20, 2018
Same here.
FWIW, when I enter a shell on the db container as user
postgres
I can dopg_dump -U odoo -d <dbname> >dump.sql
Then extract it with
docker cp <containerId>:/var/lib/postgresql/dump.sql .
e-belair commentedon Jan 8, 2019
Hi I encounter the same problem. I think it's because the psql client version installed on the odoo image is 9.x while db is 10.x
When I connect to the odoo bash, psql -V return 9.6.10 while db return 10.6.
And when I try to dump, I get this error in the odoo output:
holdenrehg commentedon Jan 10, 2019
This seems to be an ongoing issue with the odoo docker images @manuscle and as far as I'm aware, the general response from odoo is manually patch it yourself.
e-belair commentedon Jan 10, 2019
@holdenrehg I already forked and patched the repos. But as long as Odoo 12 need Postgres 10 minimal, the pg client should be at least v10
fractalf commentedon Jan 28, 2019
I hade the same issue and wrongly connected it to the odoo repo. Apparently there is a fix coming.
Check out the comments here odoo/odoo#30599
gauravgcchawla commentedon Feb 1, 2019
I have found the solution to this problem
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
Despite of using this command to create a postgres database in docker use this
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:9.6
What it will do is it will install postgres 9.6 and you can then create backup easily
fractalf commentedon Feb 8, 2019
@gauravgcchawla any anyone else coming across this:
This is fixed now in the official docker image https://github.com/odoo/docker
Use this instead of downgrading your postgres db :)
@d-fence You can probably close this issue now :)
nikolaiortiz commentedon Feb 13, 2019
Hi, sorry, totaly new on this but with the same problem.
Can you explain a little more about what to do.
Thanks a lot.
d-fence commentedon Feb 14, 2019
Hi, it's fixed here
and was merged in docker hub here
As already explained, if the psql client used to create the backup is from a postgres version smaller than the postgres server, it may fail. The latest dockers images, for any Odoo version, now uses the latest postgres psql client to create backups.
So the best thing to do is using the latest Docker image.