Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew resolves Postgres dependency to v13 which isn't supported yet #13

Closed
baarkerlounger opened this issue Oct 21, 2020 · 8 comments · Fixed by #14
Closed

Brew resolves Postgres dependency to v13 which isn't supported yet #13

baarkerlounger opened this issue Oct 21, 2020 · 8 comments · Fixed by #14

Comments

@baarkerlounger
Copy link

Brew now tries to install Postgres 13 as a dependency but that doesn't seem to be supported yet.

$ brew install timescaledb --with-oss-only
==> Installing dependencies for timescale/tap/timescaledb: postgresql
==> Installing timescale/tap/timescaledb dependency: postgresql
==> Pouring postgresql-13.0.catalina.bottle.tar.gz

-- Compiling against PostgreSQL version 13.0
CMake Error at CMakeLists.txt:209 (message):
  TimescaleDB only supports PostgreSQL 9.6.3+, 10.2+, 11 or 12
@sarfata
Copy link

sarfata commented Oct 21, 2020

Ran into the same issue. This seems pretty similar to #6

I was able to get things back in place by editing the recipe locally.

  • Run brew edit timescaledb
  • Change the dependency to postgresql to postgresql@11
  • Make sure you remove postgresql 13: brew uninstall postgresql --ignore-dependencies
  • Then brew upgrade timescale/tap/timescaledb

I did not lose any data along the way.

(I also tried postgresql@12 too, which I think should work but I was getting compilation errors postgres.h not found - I did not investigate too much since @11 works and is all I need).

@baarkerlounger
Copy link
Author

I ended up doing:

brew install postgresql
brew install postgresql@12
cp -rf /usr/local/Cellar/postgresql@12/12.4_1 /usr/local/Cellar/postgresql/
brew switch postgres 12.4_1
cp -rf /usr/local/Cellar/postgresql/12.4_1/include/postgresql/include/ /usr/local/opt/postgresql@12/include/

Which got it working with postgresl@12. That last step is the one that resolved compilation errors for me (moves the server headers to where pg_config was looking for them).

@timgrc
Copy link

timgrc commented Oct 26, 2020

Waiting for the compatibility of PG13 by Timescale, we use PG11 in my team.
So, I wrote the following tutorial.
Thank you @sarfata for your answer.

Install TimescaleDb on Mac

Because of the incompatibility of postgresql 13 with timescaledb, you need to install postgresql 11.

With these following steps, you will install postgres 11 and timescaledb.

  1. Install the version 11 of postgresql
    brew install postgresql@11

  2. Link postgresql 11
    brew link --overwrite -f postgresql@11

  3. Change text editor of homebrew to put your favorite editor (VSCode in the example)
    In our case, put the following line on your .zshrc file :
    export HOMEBREW_EDITOR=code

  4. Add the tap of timescaledb
    brew tap timescale/tap

  5. Open edition of install config of timescaledb
    brew edit timescaledb

  6. Replace postgresql by postgresql@11 in the config file.

  7. Install timescaledb
    brew install timescaledb

  8. Move files to appropriate place
    /usr/local/bin/timescaledb_move.sh

@dokie
Copy link

dokie commented Oct 27, 2020

Following @baarkerlounger instructions I had to modify the last cp command to be

cp -rf /usr/local/Cellar/postgresql/12.4_1/include/postgresql/server /usr/local/opt/postgresql@12/include/

on my Mac.

@tyagiakhilesh
Copy link

What worked for me is:

  • brew edit timescaledb and change the dependency to postgresql to postgresql@12
  • cp -rf /usr/local/Cellar/postgresql\@12/12.4_1/include/postgresql/server /usr/local/opt/postgresql@12/include/
  • brew install timescaledb

@Habam
Copy link

Habam commented Nov 13, 2020

For MacOS Catalina, complete steps after trying brew install timescaledb and failed

brew uninstall postgresql
brew install postgresql@12
ln -s /usr/local/Cellar/postgresql@12/12.4_1/include/postgresql/server /usr/local/Cellar/postgresql@12/12.4_1/include/server

brew tap timescale/tap
brew edit timescale/tap/timescaledb
-- depends_on "postgresql" => :build     #old
-- depends_on "postgresql@12" => :build  #new

brew install timescaledb

@VineethReddy02
Copy link
Contributor

@RobAtticus I think we can close this now. As the fix is merged.

@JuanitoFatas
Copy link

I installed the 2.3.0 formula with PostgreSQL 13 and it works, maybe we could close this issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants