I’ve been getting into time-series databases over the past few months. I got into playing with TimescaleDB and was super impressed with its capabilities. One of the important things to understand is that TimescaleDB is just Postgres at its core which means technically TimescaleDB is an extension. Following is my usual MO to quickly run an instance of TimescaleDB.
Getting a docker container up:
docker run -d --name timescaledb -p 5434:5434 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg11
Connecting to said docker container:
docker exec -it timescaledb psql -U postgres
Creating your database:
CREATE database tstutorial;
Connecting to your new database:
\c tstutorial
Adding the TimescaleDB extension:
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
That’s it! Now you have a dockerized TimescaleDB instance up and running.