From source

Note: TimescaleDB requires PostgreSQL 12 or 13.

Prerequisites

  • A standard PostgreSQL 13 installation with development environment (header files) (see https://www.postgresql.org/download/ for the appropriate package)
  • C compiler (e.g., gcc or clang)
  • CMake version 3.11 or greater

Build and install with local PostgreSQL

tip
It is highly recommended that you checkout the latest tagged commit to build from (see the repo's Releasesgithub-releases page for that)

Clone the repository from GitHub:

git clone https://github.com/timescale/timescaledb.git
cd timescaledb
git checkout <release_tag>  # e.g., git checkout 2.2.1

# Bootstrap the build system
./bootstrap

# To build the extension
cd build && make

# To install
make install
warning
Our build scripts use pg_config to find out where PostgreSQL stores its extension files. If you have two versions of PostgreSQL installed, use pg_config to find out which version TimescaleDB was installed with.

Update postgresql.conf

You will need to edit your postgresql.conf file to include the TimescaleDB library, and then restart PostgreSQL. First, locate your postgresql.conf file:

psql -d postgres -c "SHOW config_file;"

Then modify postgresql.conf to add the required library. Note that the shared_preload_libraries line is commented out by default. Make sure to uncomment it when adding our library.

shared_preload_libraries = 'timescaledb'
tip
If you have other libraries you are preloading, they should be comma separated.

Then, restart the PostgreSQL instance.

tip
Our standard binary releases are licensed under the Timescale License, which allows to use all our capabilities. To build a version of this software that contains source code that is only licensed under Apache License 2.0, pass -DAPACHE_ONLY=1 to bootstrap.

Found an issue on this page?

Report an issue!