Installing Timescaledb on Postgres App(macOS)

Search for a command to run...

No comments yet. Be the first to comment.
Motivation Recently, I tried to learn some low-level system programming stuff. I am a Mac user, and I thought that everything that works on Linux should also work on Mac. After all, Mac is a Unix-based system 😊. I guess we all heard this. Oh boy! I ...

Problem Statement While working on a Nestjs project, I encountered a weird problem related to the database column. I was trying to insert a record into a MySQL table using TypeORM. The error I was experiencing stated that a specific column “cannot be...

Recently, I was exploring design patterns courses on my LinkedIn Learning subscription. I came across a course, Node.js: Design Patterns by Alex Banks. It is a wonderful, easy-to-understand course. I started with the Builder Pattern, and the explanat...

Suppose you are working on a table in a LiveView project. This table has limited static data of not more than one page (you can avoid questions about pagination in the comment section 😊). From a user's point of view, it becomes hard to look into the...

Recently, while working on one of my personal Elixir projects. I came across a scenario where I needed to make some changes to the database schema.The changes mainly revolve around adding and removing indexes due to changes in the business requiremen...

Recently, while working on one of the projects. I came across the requirement to use Timescaledb. I use postgress.app for managing different versions of PostgreSQL for different projects. This was my first encounter with timescaledb, I had never used it before. So, I started to look at the official documentation and follow the steps mentioned in the macOS (section). One thing, I was sure of after reading the documentation is that these steps will not be going to work in my case(with postgress.app). My suspicion was right and I struggled in configuring it. This mini blog is about the insight steps that I learned from different sources on the internet while installing timescaledb.
timescaledb is to have Postgress.app installed.brew tap timescale/tapbrew install timescaledbtimescaledb-tune which requires passing the Postgres path with the version number of Postgres.(NOTE: Suppose, you have multiple version of Postgres say 13 and 14 and we want to install timescaledb on version 14 so we will use var-14 in the conf-path).timescaledb-tune --yes --conf-path=/Users/<user_name>/Library/Application\ Support/Postgres/var-14/postgresql.conf
/opt/homebrew/Cellar/timescaledb/ and you will see folder with some number, it is nothing but timescaledb version. In my case, it is 2.8.1 so we will be using it in the below script. So, run the below script with your timescaledb number./usr/bin/install -c -m 755 $(find /opt/homebrew/Cellar/timescaledb/2.8.1/lib/timescaledb/postgresql@14/ -name "timescaledb*.so") /Applications/Postgres.app/Contents/Versions/14/lib/postgresql
/usr/bin/install -c -m 644 /opt/homebrew/Cellar/timescaledb/2.8.1/share/timescaledb/* /Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension/
Server Settings button

show button of config i.e second option.

postgresql.conf file selected. Now, open this file and add the following lines at the end of the file.shared_preload_libraries = 'timescaledb'
CREATE EXTENSION IF NOT EXISTS timescaledb;
I hope you like this blog. If you have any questions then please comment below. Thanks for reading 😊.