Vultr DocsLatest Content

Associated Doc

How to Fix the pgvector "could not open extension control file" Error?

Updated on 15 September, 2025

Troubleshooting guide for resolving the pgvector extension control file error in Vultr Managed PostgreSQL databases


In Vultr Managed Databases for PostgreSQL, you may encounter the following error when attempting to enable the pgvector extension:

ERROR: could not open extension control file "/usr/pgsql-16/share/extension/pgvector.control": No such file or directory

This typically happens when the extension name in your CREATE EXTENSION command does not match the actual identifier recognized by PostgreSQL. Although the upstream project is called pgvector, the extension is installed and registered under the name vector. As a result, PostgreSQL cannot locate a control file for pgvector because it is not registered under that name.

To correctly enable the extension, connect to your Vultr Managed Database for PostgreSQL using vultradmin and run:

sql
defaultdb=> CREATE EXTENSION vector;

Once the extension is created, you can verify it is active by running:

sql
defaultdb=> \dx

The output should include an entry similar to:

sql
Name   | Version |   Schema   |                     Description                      
---------+---------+------------+------------------------------------------------------
 vector  | 0.7.4   | public     | vector data type and ivfflat and hnsw access methods

This lists all installed extensions in the current database, including vector, which can be used for vector-based indexing and similarity search.