1

I am trying to compile rust package for timescaleDB. I am using ubuntu and I am trying to compile for centos 7.

https://github.com/timescale/timescaledb-toolkit

After compiling it creates two directory. One called crates.

enter image description here

Another target>release directory. enter image description here

How do I move this compiled extension to centos and install it in postgres?

kinkajou
  • 3,664
  • 25
  • 75
  • 128

1 Answers1

2

You need to copy the files to your postgresql installation folder following your OS directories.

Here you see the docker image adding the timescaledb to the postgresql.conf file.

Here you can see how the sync the extensions folder is just copying the generated files to the machine that will consume the extension.

You'll also need to copy the files over the .sql and .control to your extensions folder.

In my mac it is running with homebrew it is:

/usr/local/share/postgresql/extension/

You can find more details about extension structure here.

jonatasdp
  • 1,072
  • 6
  • 8
  • I ran [this](https://github.com/timescale/timescaledb-toolkit/blob/da87d2d9ff1117036144e39be159623302fa4275/docker/nightly/Dockerfile#L39-L40) command to compile but how to compile for centos? – kinkajou Oct 04 '21 at 15:45
  • I don't think the extensions diverge too much between Linux OSes. I think you can use the same command, just need to find a way to move the compiled folders to the right folder in CentOs. A related conversation about what is the folder structure: https://stackoverflow.com/questions/3004523/postgresql-database-default-location-on-linux – jonatasdp Oct 06 '21 at 12:09