I use Postgres.app to manage PostgreSQL on my Mac. I wanted to install Timescaledb locally and ran into few issues while installing it which are discussed in this post.
Timescaledb is an open-source database built for analyzing time-series data which is built on top of PostgreSQL.
Timescaledb allows installation on OS X via two mechanisms - via Source and via Homebrew. If we are using PostgreSQL managed by Homebrew then we can install Timescaledb also via Homebrew. But if we want to use Timescaledb along with Postgres.app then we have to install it via Source as per Timescaledb documentation.
Create the directory /Library/LaunchAgents if it doesn’t exist already. Step B – Copy the plist file to /Library/LaunchAgents/. There’s a plist file that comes with the postgres install from homebrew. When upgrading to 9.6.2, my plist was at /usr/local/Cellar/postgresql/9.6.2/homebrew.mxcl.postgresql.plist. The easiest way to install PostgreSQL on a Mac is by installing Postgres.app. Postgres.app is a full-featured PostgreSQL installation packaged as a standard Mac application. There are many clients for PostgreSQL on the Mac. You can find many of them in the Community Guide to PostgreSQL GUI Tools in the PostgreSQL wiki. Some of them are quite powerful; some are still a bit rough. Here’s a list of all the Mac Apps I found (in alphabetic order): Datagrip; Datazenit; DBeaver; DBGlass; DbVisualizer; Froq; Metabase; Navicat for PostgreSQL. Postgres.app includes the PostgreSQL binaries inside the application package. By default, PostgreSQL version 9.5 and 9.6 are included. This error means that the binaries for this server were not found. This could happen if a future version of Postgres.app drops does not include your version of PostgreSQL anymore.
Before starting the installation make sure that the
pg_config
path is using the path of pg_config
utility installed by Postgres.app. This can be verified by running following command.If the output is something else, then follow the instructions here to setup the CLI utilities installed by Postgres.app properly.
Now it is time to start installing Timescaledb. First we need to download the source code and switch to appropriate stable release tag for installation.
This results in following error.
Eos info app. We can resolve it as follows.
Running this shows up another error.
The
pg_isolation_regress
is a binary from PostgreSQL which does not get built in a normal PostgreSQL build. We have to build it ourself if we want to run the isolation regression tests. As we don't want to do that we can skip it as mentioned in the above error message.If it runs successfully then it will print following at the end.
We can go ahead and run the next command.
![Install postgres mac Install postgres mac](/uploads/1/3/3/9/133933811/468972387.jpg)
After this, we need to edit the
postgresql.conf
to add timescaledb
to shared_preload_libraries
.Then uncomment the line with
shared_preload_libraries
and change it to following.After that we have to restart PostgreSQL. If it restarts successfully, the installation is successful. If not we can check the errors as follows.
After successful restart, we can start
psql
and add the timescaledb
extension to our database.And that's all. Timescaledb is setup properly now running with PostgreSQL managed by Postgres.app.
I use Postgres.app to manage PostgreSQL on my Mac. I wanted to install Timescaledb locally and ran into few issues while installing it which are discussed in this post.
Timescaledb is an open-source database built for analyzing time-series data which is built on top of PostgreSQL.
Timescaledb allows installation on OS X via two mechanisms - via Source and via Homebrew. If we are using PostgreSQL managed by Homebrew then we can install Timescaledb also via Homebrew. But if we want to use Timescaledb along with Postgres.app then we have to install it via Source as per Timescaledb documentation.
Prerequisite
Before starting the installation make sure that the
pg_config
path is using the path of pg_config
utility installed by Postgres.app. This can be verified by running following command.If the output is something else, then follow the instructions here to setup the CLI utilities installed by Postgres.app properly.
Mac Postgresql
Build
Now it is time to start installing Timescaledb. First we need to download the source code and switch to appropriate stable release tag for installation.
This results in following error.
Install Postgres Mac
We can resolve it as follows.
Running this shows up another error.
The
pg_isolation_regress
is a binary from PostgreSQL which does not get built in a normal PostgreSQL build. We have to build it ourself if we want to run the isolation regression tests. As we don't want to do that we can skip it as mentioned in the above error message.If it runs successfully then it will print following at the end. https://austinclever.weebly.com/screen-sharing-app-macos.html.
Install
We can go ahead and run the next command.
After this, we need to edit the
postgresql.conf
to add timescaledb
to shared_preload_libraries
.Then uncomment the line with
shared_preload_libraries
and change it to following.After that we have to restart PostgreSQL. If it restarts successfully, the installation is successful. If not we can check the errors as follows.
After successful restart, we can start
psql
and add the timescaledb
extension to our database.And that's all. Timescaledb is setup properly running with PostgreSQL managed by Postgres.app.