TimescaleDB is a PostgreSQL extension for time series and demanding workloads that ingest and query high volumes of data. You can host TimescaleDB on macOS device.

Want to skip these steps?

Deploy a Timescale service in the cloud. We tune your database for performance and handle scalability, high availability, backups and management so you can relax.

Try for free

This section shows you how to:

To install TimescaleDB on your MacOS device, you need:

  • PostgreSQL: for the latest functionality, install PostgreSQL v16
Warning

If you have already installed PostgreSQL using a method other than Homebrew or MacPorts, you may encounter errors following these install instructions. Best practice is to full remove any existing PostgreSQL installations before you begin.

To keep your current PostgreSQL installation, Install from source.

This section shows you how to install the latest version of PostgreSQL and TimescaleDB on a supported platform using the packages supplied by Timescale.

  1. Install Homebrew, if you don't already have it:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    For more information about Homebrew, including installation instructions, see the Homebrew documentation.

  2. At the command prompt, add the TimescaleDB Homebrew tap:

    brew tap timescale/tap
  3. Install TimescaleDB and psql:

    brew install timescaledb libpq
  4. Update your path to include psql.

    brew link --force libpq

    On Intel chips, the symbolic link is added to /usr/local/bin. On Apple Silicon, the symbolic link is added to /opt/homebrew/bin.

  5. Run the timescaledb-tune script to configure your database:

    timescaledb-tune --quiet --yes
  6. Change to the directory where the setup script is located. It is typically, located at /opt/homebrew/Cellar/timescaledb/<VERSION>/bin/, where <VERSION> is the version of timescaledb that you installed:

    cd /opt/homebrew/Cellar/timescaledb/<VERSION>/bin/
  7. Run the setup script to complete installation.

    ./timescaledb_move.sh
  8. Login to PostgreSQL as postgres

    sudo -u postgres psql

    You are in the psql shell.

  9. Set the password for postgres

    \password postgres

    When you have set the password, type \q to exit psql.

For improved performance, you enable TimescaleDB on each database on your self-hosted PostgreSQL instance. This section shows you how to enable TimescaleDB for a new database in PostgreSQL using psql from the command line.

  1. Connect to a database on your PostgreSQL instance

    In PostgreSQL, the default user and database are both postgres. To use a different database, set <database-name> to the name of that database:

    psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"
  2. Add TimescaleDB to the database

    CREATE EXTENSION IF NOT EXISTS timescaledb;
  3. Check that TimescaleDB is installed

    \dx

    You see the list of installed extensions:

    List of installed extensions
    Name | Version | Schema | Description
    -------------+---------+------------+---------------------------------------------------------------------------------------
    plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
    timescaledb | 2.15.1 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)

    Press q to exit the list of extensions.

And that is it! You have TimescaleDB running on a database on a self-hosted instance of PostgreSQL.

Now you have TimescaleDB running, have a look at the:

  • Tutorials: walk through a variety of business scenarios using example datasets.
  • Use Timescale: browse the features available with TimescaleDB.

For the latest functionality, install MacOS 14 Sanoma. The oldest supported version is macOS 10.15 Catalina

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.