the current one is 11, we should update it to the latest postgres release
Hello!
Wondering if this is causing an issue. I have a fresh install of Hasura (local docker-compose.yaml setup, following the tutorial), trying to create an "init" migration of an existing DB, running:
hasura migrate create "init" --from-server --admin-secret=xxx
and getting the following output:
time="2019-10-07T15:13:26-07:00" level=fatal msg="cannot fetch schema dump: [unexpected] error while executing pg_dump: pg_dump: server version: 12.0 (Debian 12.0-1.pgdg100+1); pg_dump version: 11.5 (Debian 11.5-1.pgdg90+1)\npg_dump: aborting because of server version mismatch\n ($)"
I've got a test-case for the pg_dump version mismatch issue:
Should be able to trigger it with: docker-compose up migration-dump-bug
Hello,
I get the same error.
Can you advise for a workaround of this issue, I can't do hasura migrate create "init" --from-server right now.
We have a PR open to add PG12 tests: #3102
This would update pg_dump to 12
Thanks a lot, great to see things are moving.
Being new to docker I'd still be interested in knowing if there's a way to go around it, probably by building the docker myself?
dumb followup question @shahidhk
How should I proceed to make sure to get the latest bundled version?
I still get the same error using the latest docker image
graphql-engine:
image: hasura/graphql-engine:lastest
@Tbaut this will only be available on beta.9 release.
As a workaround, you can copy the pg_dump binary from the dev build. Build the following docker image and use it instead of hasura/graphql-engine:
FROM hasura/graphql-engine:v1.0.0-beta.8
COPY --from=hasura/graphql-engine:pg-12-tests-304abecc /bin/pg_dump /bin/pg_dump
This is not tested, also I suspect there is a possible bug with the current master. Let me push a fix and update this comment.
@Tbaut Use the following dockerfile to your custom image with pg_dump 12:
FROM hasura/graphql-engine:v1.0.0-beta.8
COPY --from=hasura/graphql-engine:pull3249-9a298cae /bin/pg_dump /bin/pg_dump
Thank you so much.
For the record and if this can be useful for a noob like me in the future.
mkdir graphql-engine && cd graphql-engineDockerfiletext
FROM hasura/graphql-engine:v1.0.0-beta.8
COPY --from=hasura/graphql-engine:pull3249-9a298cae /bin/pg_dump /bin/pg_dump
docker build -t graphql-engine:pgdump12 .docker-compose.yamlgraphql-engine:
# The next line was commented as we now use the new docker image
# image: hasura/graphql-engine:v1.0.0-beta.8
image: graphql-engine:pgdump12
FWIW, you can also specify a docker image inside a compose file and not have an extra step 馃帀
graphql-engine:
build:
context: .
dockerfile: Dockerfile
Most helpful comment
@Tbaut Use the following dockerfile to your custom image with pg_dump 12: