TimescaleDB RE-package
TimescaleDB - Time-series database for high-performance real-time analytics packaged as a Postgres extension
I needed TimescaleDB for one of my projects while running Windows 11 (25H2) with PostgreSQL v16.1. Although Tiger Data provides various installation instructions (including Windows), unfortunately the installer could not locate my pg_config.
- I attempted to compile TimescaleDB from the latest source, but the latest source no longer supports my PostgreSQL version. The build failed with the following error:
<your-pgsql-folder>\timescaledb\src\compat\compat.h(63,1): error C1189: #error: "Unsupported PostgreSQL version" [<your-pgsql-folder>\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
From this error it is clear that the correct TimescaleDB version for a given PostgreSQL release can be determined by inspecting src/compat/compat.h in the TimescaleDB source branches.
- I reviewed the TimescaleDB release packages on GitHub and tested several older releases until I found a package compatible with PostgreSQL v16.1.
- Once I found a matching release package, I installed the extension using the steps below.
- Stop the PostgreSQL service via
services.msc. - Download the appropriate TimescaleDB package from the Releases page (choose the package that matches your PostgreSQL version).
- Extract the ZIP file into your PostgreSQL installation directory (overwrite or merge files as required).
a.*.dllfiles goes to<your-pgsql-folder>\libfolder
b.*.controland*.sqlfiles goes to<your-pgsql-folder>\share\extensionfolder.
c.timescaledb-tune.exegoes to<your-pgsql-folder>\binfolder. - From
<your-pgsql-folder>\binruntimescaledb-tune.exe -conf-path <your-pgsql-folder>\data -pg-version <major-pgsql-version>to optimizepostgresql.confsettings. (postgresql.conflocation is in<your-pgsql-folder>\data) - Start the PostgreSQL service.
- Connect to PostgreSQL, from destination DB run:
CREATE EXTENSION IF NOT EXISTS timescaledb; - If the command returns
OK, the TimescaleDB extension is installed successfully.
- Verify version:
SELECT extname, extversion FROM pg_extension WHERE extname = 'timescaledb';
- Choose the correct package: Always download the TimescaleDB package that exactly matches your PostgreSQL version and architecture.
- Common error after CREATE EXTENSION:
This error indicates the TimescaleDB binary is incompatible with the running PostgreSQL version. The fix is to downgrade or switch to a TimescaleDB release that matches your PostgreSQL version.
ERROR: could not load library "<your-pgsql-folder>/lib/timescaledb-x.xx.x.dll": The specified procedure could not be found.
- If you attempt to build from the latest source and encounter the Unsupported PostgreSQL version error, inspect
src/compat/compat.hin the TimescaleDB source to see which PostgreSQL versions are supported by that TimescaleDB commit/release.
- Currently, I have not tested all available TimescaleDB packages. Only the version that I use for my project will be included in the releases.
If you have a TimescaleDB binary package that is compatible with other PostgreSQL versions on Windows, please let me know/drop info on Discussion. I am especially interested in packages for PostgreSQL versions commonly used on Windows machines.
The official Windows instructions may fail for some local setups. When building from source, check src/compat/compat.h for supported PostgreSQL versions. For most users on Windows, the quickest path is to find a prebuilt TimescaleDB release that matches your PostgreSQL version.