PostgreSQL
10 articles · written by Niraj Kumar
PostgreSQL keeps absorbing jobs that used to need separate infrastructure: vector search via pgvector, full-text search good enough to skip Elasticsearch for many workloads, row-level multi-tenancy via RLS, and durable job or agent state. These articles lean into that.
Coverage includes hybrid retrieval combining pgvector embeddings with native full-text search using Reciprocal Rank Fusion, Row-Level Security as a hard tenant boundary for AI SaaS, LangGraph checkpointers backed by Postgres, GraphRAG-style multi-hop traversal, and a direct comparison with MongoDB for teams still choosing.
The bias throughout is toward keeping things in one database until there is a measured reason not to.
- OpenTelemetryNext.jsPostgreSQL
How to Track Per-Tenant LLM Token Costs in Next.js using OpenTelemetry and PostgreSQL
Instrument Next.js with OpenTelemetry, trace server-side LangChain calls, and attribute AI inference costs per tenant in PostgreSQL for usage billing.
- RAGPostgreSQLNext.js
How to Build a Secure Multi-Tenant RAG Pipeline using PostgreSQL Row-Level Security, Next.js, and JWT Auth
Stop cross-tenant leaks in B2B AI SaaS — PostgreSQL Row-Level Security for embeddings, tenant IDs from Next.js JWTs, and isolated retrieval.
- LangGraphHuman-in-the-LoopPostgreSQL
How to Implement Human-in-the-Loop (HITL) Approval Gates in LangGraph with PostgreSQL Checkpointers
Build production human-in-the-loop approval gates in LangGraph with AsyncPostgresSaver, interrupt_before, and Command-based resume flows.
- GraphRAGLangChainOllama
How to Build a Local GraphRAG Pipeline with PostgreSQL, LangChain, and Ollama for Multi-Hop Reasoning
Build a fully local GraphRAG system with LangChain, Ollama and PostgreSQL — extract entity triplets, store a knowledge graph, run multi-hop queries.
- MCPTypeScriptClaude Code
How to Build a Custom Model Context Protocol (MCP) Server in TypeScript for Claude Code
Build an MCP server in TypeScript with the official SDK — expose PostgreSQL inspection tools over stdio, sanitize queries, and wire it into Claude Code.
- n8nOllamaDocker
How to Self-Host a Zero-Cost, Privacy-First AI Automation Pipeline using n8n, Ollama, and Docker
Build a fully self-hosted, zero-cost AI automation pipeline with n8n, Ollama, Docker and PostgreSQL — process webhooks with local LLMs, stay offline.
- pgvectorPostgreSQLRAG
How to Implement Hybrid Search with pgvector and Full-Text Search in PostgreSQL for Node.js RAG Pipelines
Combine pgvector embeddings with PostgreSQL full-text search using Reciprocal Rank Fusion for accurate, hallucination-resistant RAG in Node.js.
- RAGOllamaLangChain
How to Build a Local RAG Pipeline Using Ollama, LangChain, and PostgreSQL
Set up a private, offline RAG system by connecting locally hosted LLMs via Ollama to a PostgreSQL pgvector database using LangChain.
- PostgreSQLMongoDBDatabase
PostgreSQL vs MongoDB: Choosing the Right Database for Your Project
PostgreSQL and MongoDB compared on schema design, scaling, consistency and developer experience — a practical way to pick one and move on.
- TypeScriptNext.jsNode.js
Full-Stack TypeScript for 2026: Building a Job-Ready App with Next.js, Node, and Postgres
Build a production full-stack TypeScript app with Next.js, Node.js and PostgreSQL — setup to deploy, with the patterns hiring teams expect.
Related topics
- Retrieval-Augmented Generation (RAG)
- LangChain & LangGraph
- Large Language Models
- AI Agents
- Next.js
- React
- TypeScript
- Node.js
- Docker & Containers
- DevOps
- CI/CD
- Application Security
- AWS
- n8n Automation