Deploy pg-pinecone
Open-source search on Postgres
pg-pinecone
Just deployed
/var/lib/postgresql
Deploy and Host pg_pinecone on Railway
pg_pinecone is an open-source Postgres extension for vector & full-text search on the data you already store, built on the engine Pinecone runs at scale. You use the same SQL as pgvector. A filter such as a tenant applies during the search, and the rows stay in Postgres. When a table needs more scale, send its search to Pinecone as a remote backend. Your queries stay the same.
About Hosting pg_pinecone
This template deploys PostgreSQL 18 with pg_pinecone installed. Railway keeps the data on a volume and gives you a connection URL. The railway database already has the extensions enabled.
Use DATABASE_URL from other services in the project. Use DATABASE_PUBLIC_URL from your own computer.
CREATE TABLE items (
id bigint PRIMARY KEY,
embedding vector(3)
);
INSERT INTO items VALUES (1, '[1,2,3]'), (2, '[4,5,6]'), (3, '[7,8,9]');
SELECT pinecone.create_index('items', 'embedding');
SELECT id FROM items ORDER BY embedding <=> '[1,2,4]' LIMIT 2;
That search runs inside Postgres.
A Pinecone API key adds a few optional tools. Turn them on one at a time:
- A remote backend, when you need more scale
embed(), to turn text into vectors from SQL- Keyword search, and search that combines keywords with vectors
rerank(), to put the best results first
Common Use Cases
- Find the records behind a support assistant, a recommendation, or an agent that remembers past work
- Search by meaning, by keyword, or by both in one query
- Limit a search to one tenant, user, or category while still filling the result list
- Keep embeddings in Postgres, and send search to a remote backend when a table needs more scale
Dependencies for pg_pinecone Hosting
The image includes PostgreSQL 18 and pg_pinecone. For the product itself, refer to more information here:
- Introducing pg_pinecone
- pg_pinecone on GitHub
- Documentation and quickstart
- Docker image: pineconeteam/pg_pinecone
Why Deploy pg_pinecone on Railway
You get search inside Postgres from one deploy. Connect with the URL Railway gives you, query with the SQL you already use, and add Pinecone as a remote backend when you need more scale.
Template Content
pg-pinecone
pineconeteam/pg_pinecone:pg18