Vector Search
Store and query embeddings for AI agents, semantic search, and RAG directly in your PostgreSQL database
Every PostgreSQL service on Rock8Cloud ships with pgvector already installed. You can store embeddings and run similarity search in the same database as the rest of your data, without adding a separate vector database to your project.
The user in your connection string is the database owner, so it can create extensions and tables on its own. Your app sets up its own schema on first run. There is nothing to request from us and no setting to turn on.
What You Get
- pgvector preinstalled on every PostgreSQL service, on every version we support, from 14 through 17
- An owner-level database user, so your app or framework can create the extension and its tables itself
- Embeddings beside your relational data, in one database with one set of transactions and one backup
- Nothing extra to provision - no second service, no second connection string, no sync job to keep two stores in agreement
Works With Your Framework
RAG and agent frameworks that manage their own schema set themselves up on first run. Mastra, for example, creates the extension and its tables the first time it builds an index. Point it at the database URL from your service and it works.
This is where hosted Postgres usually gets in the way. The database user you are given elsewhere is often not allowed to create an extension, so the framework's first call fails on a permission error and you have to go enable pgvector in a provider dashboard before anything runs. That step does not exist here.
What People Build With It
- Semantic search over documents, products, or support tickets
- Memory for agents and chatbots that has to survive between sessions
- Retrieval-augmented generation grounded in your own content
- Recommendations, deduplication, and clustering
Because it is ordinary PostgreSQL, a similarity search can be filtered and joined against your existing tables in the same query. Your permission rules and your ranking are applied together rather than split across two systems.
Using It
How you model and query your embeddings is up to you. The vector types, distance operators, and index options are documented in the pgvector documentation, and anything valid there works on your database.
If a client reports that the vector type does not exist, the extension has not been created in that database yet. Create it once, or let your framework do it on first run.
Related
- PostgreSQL - versions, storage, and connection variables
- pgweb - browse your tables and run SQL from the browser
- Environment Variables - where the connection string and API keys live
- Agents - run coding agents against your repository