Skip to content

Instantly share code, notes, and snippets.

@cristianbgp
Created May 26, 2025 23:06
Show Gist options
  • Save cristianbgp/54549549b24f133785912d5a12365c13 to your computer and use it in GitHub Desktop.
Save cristianbgp/54549549b24f133785912d5a12365c13 to your computer and use it in GitHub Desktop.
Install timescaledb on Postgress.app(macOS)
brew tap timescale/tap
brew install timescaledb

If could not execute pg_config --version

echo 'export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

Run timescaledb-tune

timescaledb-tune --yes --conf-path=/Users/<user_name>/Library/Application\ Support/Postgres/var-<pg_version>/postgresql.conf`

Navigate to /opt/homebrew/Cellar/timescaledb/ and you will see folder with some number, it is nothing but timescaledb version.

Make sure your terminal has Full Disk Access to files and folders if you get Operation not permitted.

Then run the following scripts, make sure to change <pg_version> and <timescaledb_version> for the ones you have.

/usr/bin/install -c -m 755 $(find /opt/homebrew/Cellar/timescaledb/<timescaledb_version>/lib/timescaledb/postgresql@<pg_version>/ -name "timescaledb*.dylib")  /Applications/Postgres.app/Contents/Versions/<pg_version>/lib/postgresql
/usr/bin/install -c -m 644 /opt/homebrew/Cellar/timescaledb/<timescaledb_version>/share/timescaledb/* /Applications/Postgres.app/Contents/Versions/<pg_version>/share/postgresql/extension/

Open Posgress.app and go to Server Settings and open the config file to make sure shared_preload_libraries = 'timescaledb' is there and then stop and start the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment