Almost every RAG tutorial I read starts the same way. Take your documents, split them into chunks, embed them, and load the vectors into a vector database. Then keep your original data where it was, and write something that keeps the two in sync.
I was an Oracle DBA for a long time before I moved into architecture work, and that second step always makes me a little uneasy. Not because vector databases are bad. Because "add another database" is never just one decision. It is a second copy of the data, a sync job that can fall behind, a second set of permissions, backups that are not consistent with each other, and one more thing to patch, monitor and pay for.
So I wanted to see how far I could get with just Postgres. Specifically Azure Database for PostgreSQL Flexible Server, which gives you pgvector, a DiskANN index through the pg_diskann extension, and the azure_ai extension for calling Azure OpenAI from SQL. I wrote a small tool, pgrag , to try it properly, with tests and real measurements.…