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

Extension "vectorscale" is not available in timescaledb:latest-pg16 #112

Open
AlexanderFillbrunn opened this issue Jul 23, 2024 · 6 comments

Comments

@AlexanderFillbrunn
Copy link

AlexanderFillbrunn commented Jul 23, 2024

Hi!
I am trying to run the Docker image timescale/timescaledb:latest-pg16 with a fresh volume, but CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE; fails:

postgres-1  | waiting for server to start....2024-07-23 08:27:56.339 UTC [43] LOG:  starting PostgreSQL 16.3 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
postgres-1  | 2024-07-23 08:27:56.340 UTC [43] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-1  | 2024-07-23 08:27:56.345 UTC [46] LOG:  database system was shut down at 2024-07-23 08:27:56 UTC
postgres-1  | 2024-07-23 08:27:56.350 UTC [43] LOG:  database system is ready to accept connections
postgres-1  | 2024-07-23 08:27:56.352 UTC [49] LOG:  TimescaleDB background worker launcher connected to shared catalogs
postgres-1  |  done
postgres-1  | server started
postgres-1  | 
postgres-1  | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/000_install_timescaledb.sh
postgres-1  | CREATE EXTENSION
postgres-1  | CREATE EXTENSION
postgres-1  | 2024-07-23 08:27:56.883 UTC [64] ERROR:  TimescaleDB background worker connected to template database, exiting
postgres-1  | 
postgres-1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/001_timescaledb_tune.sh
postgres-1  | 2024-07-23 08:27:56.884 UTC [43] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 64) exited with exit code 1

[...]

postgres-1  | 2024-07-23 08:27:57.054 UTC [73] ERROR:  extension "vectorscale" is not available
postgres-1  | 2024-07-23 08:27:57.054 UTC [73] DETAIL:  Could not open extension control file "/usr/local/share/postgresql/extension/vectorscale.control": No such file or directory.
postgres-1  | 2024-07-23 08:27:57.054 UTC [73] HINT:  The extension must first be installed on the system where PostgreSQL is running.
postgres-1  | 2024-07-23 08:27:57.054 UTC [73] STATEMENT:  CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;
postgres-1  | psql:/docker-entrypoint-initdb.d/init.sql:201: ERROR:  extension "vectorscale" is not available
postgres-1  | DETAIL:  Could not open extension control file "/usr/local/share/postgresql/extension/vectorscale.control": No such file or directory.
postgres-1  | HINT:  The extension must first be installed on the system where PostgreSQL is running.
postgres-1 exited with code 3

Running SELECT * FROM pg_extension; only returns plpgsql and timescaledb and checking inside the container there is no vectorscale.control in /usr/local/share/postgresql/extension/. I do see vector.control and timescaledb.control there, though.

This is my experimental docker compose service for TimescaleDB:

postgres:
    image: timescale/timescaledb:latest-pg16
    restart: always
    volumes:
      - type: bind
        source: ${PWD}/init.sql
        target: /docker-entrypoint-initdb.d/init.sql
      - ${PWD}/db_data:/var/lib/postgresql/data
    ports:
      - ${DB_PORT}:${DB_PORT}
    environment:
      POSTGRES_DB: ${DB_DATABASE}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_HOST_AUTH_METHOD: trust
      PGDATA: /var/lib/postgresql/data/pgdata

Any hint how to get this running is appreciated. Happy to test your suggestions.

@Coderik
Copy link

Coderik commented Jul 23, 2024

I had the same issue. The extension is available in the timescale/timescaledb-ha images. To be fair, the link in the README points to a guide, where the correct image is specified. Maybe it should be clarified in the docs?

@AlexanderFillbrunn
Copy link
Author

Thanks @Coderik for the hint! I am going to use the -ha image for now. IMHO rather than adjusting the docs, the extension should also be available in the non-HA image. I do not see a reason to only provide it with high availability.

@cevian
Copy link
Collaborator

cevian commented Jul 23, 2024

yes we only have it in timescale/timescaledb-ha we'll try to get it into the other image as well. Will leave this open until that happens.

@AlexanderFillbrunn
Copy link
Author

Hi @cevian, thank you! Are the Dockerfiles for timescaledb-ha and timescaledb available somewhere? I could maybe give it a shot myself.

@ethagnawl
Copy link

I got this working using this Dockerfile, @AlexanderFillbrunn.

@cho-thinkfree-com
Copy link

I also had the problem that I could only use vectorscale on ha images.
I think it would be a good idea to be able to use vectorscale on "normal" images for testing in a local development environment.
I hope it comes soon.

Thanks to @ethagnawl .

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

No branches or pull requests

5 participants