I wanted to test timescaledb using docker and started to follow the instructions found here.
version: '3'
services:
timescaledb:
image: timescale/timescaledb-postgis:0.12.0-pg10
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=derp
ports:
- 5432:5432
docker-compose up> docker exec -it playground_timescaledb_1 psql -U postgres -h localhost
psql (10.5)
Type "help" for help.
postgres=#
postgres=# CREATE database tutorial;
ERROR: source database "template1" is being accessed by other users
DETAIL: There is 1 other session using the database.
postgres=#
As result I get this ERROR as response. I also notice a lot of FATAL in the docker logs and there are multiple times the TimescaleDB ASCII art logo is printed.
The last rows of the logs:
timescaledb_1 | 2018-09-11 15:07:35.524 UTC [48] WARNING:
timescaledb_1 | WELCOME TO
timescaledb_1 | _____ _ _ ____________
timescaledb_1 | |_ _(_) | | | _ \ ___ \
timescaledb_1 | | | _ _ __ ___ ___ ___ ___ __ _| | ___| | | | |_/ /
timescaledb_1 | | | | | _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
timescaledb_1 | | | | | | | | | | __/\__ \ (_| (_| | | __/ |/ /| |_/ /
timescaledb_1 | |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
timescaledb_1 | Running version 0.12.0
timescaledb_1 | For more information on TimescaleDB, please visit the following links:
timescaledb_1 |
timescaledb_1 | 1. Getting started: https://docs.timescale.com/getting-started
timescaledb_1 | 2. API reference documentation: https://docs.timescale.com/api
timescaledb_1 | 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
timescaledb_1 |
timescaledb_1 | Note: TimescaleDB collects anonymous reports to better understand and assist our users.
timescaledb_1 | For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
timescaledb_1 |
timescaledb_1 | 2018-09-11 15:07:35.524 UTC [48] CONTEXT: PL/pgSQL function inline_code_block line 3 at RAISE
timescaledb_1 | CREATE EXTENSION
timescaledb_1 |
timescaledb_1 | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/reenable_auth.sh
timescaledb_1 |
timescaledb_1 | waiting for server to shut down...2018-09-11 15:07:35.544 UTC [31] LOG: received fast shutdown request
timescaledb_1 | 2018-09-11 15:07:35.546 UTC [31] LOG: aborting any active transactions
timescaledb_1 | 2018-09-11 15:07:35.547 UTC [50] FATAL: terminating background worker "TimescaleDB Background Worker Scheduler" due to administrator command
timescaledb_1 | 2018-09-11 15:07:35.547 UTC [46] FATAL: terminating background worker "TimescaleDB Background Worker Scheduler" due to administrator command
timescaledb_1 | 2018-09-11 15:07:35.547 UTC [53] FATAL: terminating background worker "Telemetry Reporter" due to administrator command
timescaledb_1 | 2018-09-11 15:07:35.547 UTC [38] LOG: TimescaleDB background worker launcher terminated by administrator command. Launcher will not restart after exiting
timescaledb_1 | 2018-09-11 15:07:35.548 UTC [31] LOG: worker process: logical replication launcher (PID 39) exited with exit code 1
timescaledb_1 | .2018-09-11 15:07:35.548 UTC [31] LOG: worker process: Telemetry Reporter (PID 53) exited with exit code 1
timescaledb_1 | 2018-09-11 15:07:35.552 UTC [31] LOG: worker process: TimescaleDB Background Worker Scheduler (PID 50) exited with exit code 1
timescaledb_1 | 2018-09-11 15:07:35.553 UTC [31] LOG: worker process: TimescaleDB Background Worker Scheduler (PID 46) exited with exit code 1
timescaledb_1 | 2018-09-11 15:07:35.558 UTC [49] FATAL: terminating background worker "Telemetry Reporter" due to administrator command
timescaledb_1 | 2018-09-11 15:07:35.561 UTC [31] LOG: worker process: Telemetry Reporter (PID 49) exited with exit code 1
timescaledb_1 | 2018-09-11 15:07:35.585 UTC [54] FATAL: terminating autovacuum process due to administrator command
timescaledb_1 | 2018-09-11 15:07:35.589 UTC [33] LOG: shutting down
timescaledb_1 | 2018-09-11 15:07:36.174 UTC [31] LOG: database system is shut down
timescaledb_1 | done
timescaledb_1 | server stopped
timescaledb_1 |
timescaledb_1 | PostgreSQL init process complete; ready for start up.
timescaledb_1 |
timescaledb_1 | 2018-09-11 15:07:36.211 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
timescaledb_1 | 2018-09-11 15:07:36.211 UTC [1] LOG: listening on IPv6 address "::", port 5432
timescaledb_1 | 2018-09-11 15:07:36.219 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
timescaledb_1 | 2018-09-11 15:07:36.387 UTC [55] LOG: database system was shut down at 2018-09-11 15:07:36 UTC
timescaledb_1 | 2018-09-11 15:07:36.462 UTC [1] LOG: database system is ready to accept connections
timescaledb_1 | 2018-09-11 15:07:36.477 UTC [61] LOG: TimescaleDB background worker launcher connected to shared catalogs
timescaledb_1 | 2018-09-11 15:09:11.810 UTC [74] ERROR: source database "template1" is being accessed by other users
timescaledb_1 | 2018-09-11 15:09:11.810 UTC [74] DETAIL: There is 1 other session using the database.
timescaledb_1 | 2018-09-11 15:09:11.810 UTC [74] STATEMENT: CREATE database tutorial;
What am I missing? Thanks for all the help!
Hi @Jacobh2 , we discovered a misconfiguration in our Docker images that we pushed yesterday. In order to fix the problem you're seeing, you should connect to template1 and drop the extension:
docker exec -it playground_timescaledb_1 psql -U postgres -h localhost -d template1 -c 'DROP EXTENSION timescaledb;'
Wow, that was crazy fast response - Thanks! 馃挴
Awesome! I'll try that! I tried with the timescale/timescaledb:0.12.0-pg10 docker image instead of the postgis one (though I want to be able to use that extension in the future) and then the creation worked!
Also tried to first run your suggested command on the first image and it seems to have solved the problem! Just a note @RobAtticus: Seems to be a typo at the end of the command?
No problem! Which typo do you mean?
The last ` character!
Ah I editted it right after but I guess you caught it before it changed (or from the email). Either way fixed :)
I believe this should be fixed in the 0.12.1 release: https://github.com/timescale/timescaledb/releases/tag/0.12.1
(In particular, https://github.com/timescale/timescaledb/commit/acebaea40c5feb0d5584b55d13067cdfed03cc94 )
Please let me know if this solves your problem, and we'll close out the issue.
Tested with timescale/timescaledb-postgis:0.12.1-pg10 and now I can create the 'tutorial' database correctly!
Thanks for the help!