docker
docker copied to clipboard
pg_last_xlog_receive_location() does not exist
Version 7.1.0 breaks with
ERROR: function pg_last_xlog_receive_location() does not exist at character 283
Could this be the cause? PG 10 renamed "xlog" to "wal" as stated here
Hi there! Could you add some context on the situation when you run into this issue? Since this is in the Docker repo, I presume you encounter this in a Docker image. I don't think we're doing anything specific w.r.t the transaction log in Docker, so it may be a more general issue
I am running docker-compose -p citus up
I then get errors such as worker_1 | 2017-12-13 20:25:40.868 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.1.
Previously, I had installed apt-get install postgresql-server-dev-9.6 on my desktop, but I don't think this would be relevant to docker.
Next, I tried docker version 7.0.1, since the base image uses PostgreSQL 9.6. The master and manager starts but the worker gets killed.
worker_2 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/001-create-citus-extension.sql
worker_2 | LOG: starting maintenance daemon on database 12407 user 10
worker_2 | CONTEXT: Citus maintenance daemon for database 12407 user 10
worker_2 | CREATE EXTENSION
worker_2 |
worker_2 |
worker_2 | LOG: received fast shutdown request
worker_2 | waiting for server to shut down...LOG: aborting any active transactions
worker_2 | .FATAL: terminating connection due to administrator command
worker_2 | CONTEXT: Citus maintenance daemon for database 12407 user 10
worker_2 | LOG: autovacuum launcher shutting down
worker_2 | FATAL: terminating autovacuum process due to administrator command
worker_2 | LOG: worker process: Citus Maintenance Daemon: 12407/10 (PID 54) exited with exit code 1
worker_2 | LOG: shutting down
worker_2 | LOG: database system is shut down
worker_2 | done
worker_2 | server stopped
@once-ler It seems you'll need to remove the volumes and have an empty data directory, since you can't re-use the Postgres 9.6 data directory when running on 10. Whilst there are ways to upgrade, assuming this is your development environment I would just reset it.
The following should do it:
docker-compose -p citus -v down
docker-compose -p citus up
Thanks @lfittl That did the trick.
When I do a sudo -u postgres psql -h localhost and check the number of workers, I always get 0.
Is there something else I need to do?
postgres=# SELECT master_get_active_worker_nodes();
master_get_active_worker_nodes
--------------------------------
(0 rows)
@once-ler I'm wondering if the worker nodes correctly registered - what does docker ps show?
@lfittl I also tried docker-compose -p citus scale worker=2
docker ps shows the workers are up but the query still returns 0.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1a79cd48785a citusdata/citus:7.1.1 "docker-entrypoint.sh" 57 minutes ago Up 57 minutes (healthy) 5432/tcp citus_worker_2
247ab7fb6044 citusdata/citus:7.1.1 "docker-entrypoint.sh" 59 minutes ago Up 59 minutes (healthy) 5432/tcp citus_worker_1
66e6b817c2a5 citusdata/citus:7.1.1 "docker-entrypoint.sh" 59 minutes ago Up 59 minutes (healthy) 0.0.0.0:5432->5432/tcp citus_master
This is logs from citus_worker_1:
PostgreSQL init process complete; ready for start up.
2017-12-13 21:28:34.283 UTC [1] WARNING: citus.enable_deadlock_prevention is deprecated and it has no effect. The flag will be removed in the next release.
2017-12-13 21:28:34.289 UTC [1] LOG: number of prepared transactions has not been configured, overriding
2017-12-13 21:28:34.289 UTC [1] DETAIL: max_prepared_transactions is now set to 200
2017-12-13 21:28:34.289 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2017-12-13 21:28:34.289 UTC [1] LOG: listening on IPv6 address "::", port 5432
2017-12-13 21:28:34.381 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2017-12-13 21:28:34.552 UTC [86] LOG: database system was shut down at 2017-12-13 21:28:34 UTC
2017-12-13 21:28:34.604 UTC [1] LOG: database system is ready to accept connections