Enable TimescaleDB

TimescaleDB is an open source time-series database built on top of PostgreSQL. It is a powerful tool for analyzing time-series data, and is a great fit for many Fly applications.

The Fly Postgres app includes the TimescaleDB extension. To enable TimescaleDB, take the following steps:

Check Your Postgres Image Version

Make sure your Postgres app is running >= v0.0.28:

# View your image details
fly image show --app <app-name>

# Update to the latest
fly image update --app <app-name>

Configure Postgres to Preload the TimescaleDB Library

fly pg config update --shared-preload-libraries timescaledb --app <app-name>

Restart Your Postgres App

fly pg restart --app <app-name>

Create the Extension

Connect to your postgres database:

# Connect to your target database
fly pg connect --app <app-name> --database <db-name>

From the postgres=# % prompt, create the extension:

CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;