TimescaleDB is a PostgreSQL extension for time series and demanding workloads that ingest and query high volumes of data.

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:

Warning

If you have previously installed PostgreSQL without a package manager, 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.

To install TimescaleDB on your Windows device, you need:

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 the latest version of PostgreSQL and psql

    1. Download PostgreSQL, then run the installer.

      1. In the Select Components dialog, check Command Line Tools, along with any other components you want to install, and click Next.

      2. Complete the installation wizard.

        If you see an error like could not load library "C:/Program Files/PostgreSQL/17/lib/timescaledb-2.17.2.dll": The specified module could not be found., use Dependencies to ensure that your system can find the compatible DLLs for this release of TimescaleDB.

    2. Check that you can run pg_config. If you cannot run pg_config from the command line, in the Windows Search tool, enter system environment variables. The path should be C:\Program Files\PostgreSQL\<version>\bin.

  2. Install TimescaleDB

    1. Unzip the TimescaleDB installer to <install_dir>.

      Best practice is to use the latest version.

    2. In <install_dir>, right-click setup.exe, then choose Run as Administrator.

    3. Complete the installation wizard.

  3. Tune your PostgreSQL instance for TimescaleDB

    Run the timescaledb-tune script included in the timescaledb-tools package with TimescaleDB. For more information, see configuration.

  4. Login to PostgreSQL as postgres

    sudo -u postgres psql

    You are in the psql shell.

  5. 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.17.2 | 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 release information, see the GitHub releases page and the release notes.

Keywords

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