user29174523
user29174523

Reputation: 1

Node.js app with PostgreSQL running in Docker — enabling pgvector, but the app is looking for the vector.control file in the wrong location

I have a node js app running on my local machine connecting to postgresql running as a docker instance. I am trying to get pgvector working in the postgres docker instance but am receiving a file / dir not found error.

I have the extension installed confirmed by running

SELECT * FROM pg_extension;

 13569 | plpgsql |       10 |           11 | f              | 1.0        |           
 16389 | vector  |       10 |         2200 | t              | 0.8.0      |           

My node application is looking for the vector file vector.control at /Library/PostgreSQL/17/share/postgresql/extension/vector.control\ but it is located inside my docker instance here /usr/share/postgresql/17/extension/vector.control

I'm connecting to postgres using the pg node package.

postgres version -  PostgreSQL 17.2 (Debian 17.2-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

vector version -  0.8.0 

Error message:
{"length":327,"name":"error","severity":"ERROR","code":"0A000","detail":"Could not open extension control file "/Library/PostgreSQL/17/share/postgresql/extension/vector.control": No such file or directory.","hint":"The extension must first be installed on the system where PostgreSQL is running.","file":"extension.c","line":"510","routine":"parse_extension_control_file"}

Would appreciate any help to get this working!

Confirming extension installation location

-ls /usr/share/postgresql/17/extension/vector.control -> /usr/share/postgresql/17/extension/vector.control

Upvotes: 0

Views: 130

Answers (0)

Related Questions