GithubHelp home page GithubHelp logo

Comments (2)

jon-sully avatar jon-sully commented on May 29, 2024

Oh, and I think the formula needs to target toolkit v1.18.0 now instead of 1.17.0 too

url "https://github.com/timescale/timescaledb-toolkit/archive/refs/tags/1.17.0.tar.gz"

from homebrew-tap.

jon-sully avatar jon-sully commented on May 29, 2024

In case anybody needs to get timescale toolkit installed in the meantime, here's the absolutely insane way I went about it.

First, open up the Homebrew formula (should be /opt/homebrew/Library/Taps/timescale/homebrew-tap/timescaledb-toolkit.rb) and edit the url on line 4 and sha256 on line 5 to:

url "https://github.com/timescale/timescaledb-toolkit/archive/refs/tags/1.18.0.tar.gz"
sha256 "f876fd8bdd5516237378e9c7556fec13740f5c8021911b1a8ceb8b1bde4c9cac"

Next, run brew install --interactive timescaledb-toolkit. It will yield a new shell session.

Now we start manually running the commands that the formula would (essentially) do anyway, just with correct version numbers and such.

curl -L https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v0.10.2.tar.gz -o cargo-pgrx.tar.gz
# then
mkdir pgrx
# then 
tar -xzf cargo-pgrx.tar.gz -C pgrx
# then 
cargo install --locked --path pgrx/pgrx-0.10.2/cargo-pgrx
# then 
cargo pgrx init --pg16 pg_config
# then
cd extension
# then 
cargo pgrx package
# then 
cd ..

Then we have to open up the post-install script from the toolkit code itself and edit it. However you prefer, but for VS code it's open -a Visual\ Studio\ Code tools/post-install/src/main.rs

We'll edit line #119 from "so" to "dylib" and lines 192 and 193 both from ".so" to ".dylib". Then save and close the file. We'll now run that post-install script:

cargo run --bin post-install -- --dir target/release/timescaledb_toolkit-pg16

Now, since the brew shell wouldn't let me move the actual extension files into the PG directory (🙄), the next step is to get your current tmp file path:

pwd
#=> /private/tmp/timescaledb-toolkit-20231207-79814-3k8arq

Then open a new shell of your own (with your normal user access, not one spun up by Homebrew for you) separate from the brew shell. DO NOT close or exit the brew shell yet. If you do, Brew will automatically delete all files (clean up) the /tmp directory it gave you. We still need those files.

So, open up a new shell / console in a new tab / pane / etc. and let's manually copy the extension files from the /tmp subdirectory they were just built in, into our Homebrew Postgres installation. Your version numbers may vary (so double check) but there are three commands:

# cp <from> <to>
cp /private/tmp/timescaledb-toolkit-20231207-79814-3k8arq/timescaledb-toolkit-1.18.0/target/release/timescaledb_toolkit-pg16/opt/homebrew/opt/postgresql@16/lib/postgresql/timescaledb_toolkit-1.18.0.dylib /opt/homebrew/Cellar/postgresql@16/16.1_1/lib/postgresql/

cp /private/tmp/timescaledb-toolkit-20231207-79814-3k8arq/timescaledb-toolkit-1.18.0/target/release/timescaledb_toolkit-pg16/opt/homebrew/opt/postgresql@16/share/postgresql@16/extension/timescaledb_toolkit--1.18.0.sql /opt/homebrew/Cellar/postgresql@16/16.1_1/share/postgresql@16/extension

cp /private/tmp/timescaledb-toolkit-20231207-79814-3k8arq/timescaledb-toolkit-1.18.0/target/release/timescaledb_toolkit-pg16/opt/homebrew/opt/postgresql@16/share/postgresql@16/extension/timescaledb_toolkit.control /opt/homebrew/Cellar/postgresql@16/16.1_1/share/postgresql@16/extension

Then we can close the Homebrew console session (which will automatically clean up the /tmp directory) by firing exit (Homebrew will say nothing was installed; that is fine)

from homebrew-tap.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.