PostgreSQL + TimescaleDB Installation Guide (Windows)
Target environment: Windows 10/11 development machine
Recommended Versions
| Software | Recommended Version | Notes |
|---|---|---|
| PostgreSQL | 17 (latest stable) | PG 18 is Beta, not recommended |
| TimescaleDB | 2.24+ | Supports PG 15/16/17 |
TimescaleDB will drop PG 15 support in June 2026; new projects should use PG 16+.
Installation Steps
1. Install PostgreSQL
- Go to https://www.postgresql.org/download/windows/
- Click Download the installer (provided by EDB)
- Download PostgreSQL 17 Windows x86-64 version
- Run the installer with the following settings:
| Step | Setting |
|---|---|
| Installation Directory | Default C:\Program Files\PostgreSQL\17 |
| Components | Check all (PostgreSQL Server, pgAdmin 4, Stack Builder, Command Line Tools) |
| Data Directory | Default C:\Program Files\PostgreSQL\17\data |
| Password | Set superuser (postgres) password — make sure to remember it |
| Port | 5432 (default) |
| Locale | Default locale |
- After installation, do not check Launch Stack Builder — click Finish directly
2. Add to PATH
Open PowerShell as Administrator and run:
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "Machine") + ";C:\Program Files\PostgreSQL\17\bin", "Machine")
Reopen the PowerShell window and verify:
psql --version
Should display psql (PostgreSQL) 17.x.
3. Install TimescaleDB
- Go to https://docs.timescale.com/self-hosted/latest/install/installation-windows/
- Download the Windows installer (
.exe) for PostgreSQL 17 - Right-click → Run as administrator (important — otherwise it will fail to write to the
lib/directory due to permissions) - The installer will auto-detect the PostgreSQL path
- When asked whether to run
timescaledb-tune, selecty - When asked for the
postgresql.confpath, enter:C:\Program Files\PostgreSQL\17\data\postgresql.conf - Accept all subsequent optimization suggestions with
y
Note: If not run as administrator, you will get an
Access is deniederror and the DLL files cannot be copied.
4. Restart PostgreSQL Service
Run as Administrator:
net stop postgresql-x64-17
net start postgresql-x64-17
5. Verify Installation
psql -U postgres -c "SELECT version();"
After entering the password, you should see PostgreSQL 17.x version information.
Create Project Database
Each project uses an independent database, isolated from each other.
Jope-PLC-Monitor
psql -U postgres
CREATE DATABASE jope_plc_monitor;
\c jope_plc_monitor
CREATE EXTENSION IF NOT EXISTS timescaledb;
\dx
\dx should show the timescaledb extension as enabled. Type \q to exit.
Verification:
psql -U postgres -d jope_plc_monitor -c "SELECT extname, extversion FROM pg_extension WHERE extname = 'timescaledb';"
Future New Projects
CREATE DATABASE {project_name};
\c {project_name}
CREATE EXTENSION IF NOT EXISTS timescaledb; -- Only for projects requiring time-series functionality
Connection Information
| Item | Value |
|---|---|
| Host | localhost |
| Port | 5432 |
| Username | postgres |
| Password | Password set during installation |
| Management Tool | pgAdmin 4 (found in the Start menu) |
Connection String Example (.NET)
Host=localhost;Port=5432;Database=jope_plc_monitor;Username=postgres;Password={your_password}
Multi-Project Isolation
PostgreSQL Server (localhost:5432)
├── DB: jope_plc_monitor ← PLC-Monitor dedicated
├── DB: project_b ← Future project B
└── DB: project_c ← Future project C
- Tables, schemas, and extensions are completely isolated between different databases
- TimescaleDB Extension must be enabled individually in each database that needs it
- All projects share the same PostgreSQL Server, using only one port