postgres
Browse all articles, tutorials, and guides about postgres
Posts
Object Storage That Branches With Your Database
Database branching gives you a throwaway copy of your rows. But your app also stores files in object storage, and those normally stay in one shared bucket. On Neon a branch forks the bucket too, so each branch gets its own copy of the files. I built a small files API to prove it.
Firebase Alternatives in 2026: Choose by Why You Are Leaving, Not by a Ranking
Most "Firebase alternatives" lists rank tools you cannot compare, because Firebase is five products in a trench coat. The useful question is which part you are replacing and why you are leaving: the Firestore bill that scales with reads, or the data model you cannot port. Here is an honest map of Supabase, Appwrite, Convex, PocketBase, Nhost, Amplify and the rest, grouped by the reason you are actually switching.
The Everything-on-Your-Branch Architecture
For a decade "branch the database" has meant a copy of the schema and rows. But your app is also files, backend code, and model config. Neon now forks all of it on one branch: Postgres, object storage, functions, and the AI gateway, together and isolated. I branched a full-stack project to prove it.
A Postgres-Backed MCP Server in ~20 Lines
Most of what an MCP server does is run database queries on behalf of an AI agent. So I put one right next to the database. Here is a Postgres-backed MCP server built on Neon Functions, deployed onto a database branch, with the code, a live client test, and the repo.
Preview Environments That Include the Backend, Not Just the Frontend
Every PR gets a frontend preview URL. The backend is almost always one shared staging database, so previews quietly lie to you. On Neon a branch is the database, its data, and the functions together, so each PR can get a real isolated backend. Here is the workflow, tested end to end.
Realtime Without a WebSocket Service
Live counters, presence, notifications: the reflex is to add a websocket service to run and pay for. But if your data already lives in Postgres, it has a pub/sub built in. Here is realtime fan-out with Postgres LISTEN/NOTIFY and SSE on a Neon Function, tested with two live subscribers.
Compute That Lives on Your Database Branch
Neon Functions run your code in the same region as your Postgres, on a per-branch URL. To see why that matters I deployed a small API and timed a query from inside the function versus from a machine across the Atlantic: 1.2 ms against 135 ms. Here is how it works, with the real numbers and the repo.
I Gave an AI Agent a Database, Compute, Storage, and Models From One CLI
An AI agent usually needs four accounts: a database, somewhere to run, object storage, and a model provider. I wired all four from a single Neon credential and had a deployed image-generating agent in a few minutes. Here is the actual build log, the config that ties it together, and the honest caveats.
Neon Is Becoming a Backend Platform, Not Just Postgres
In June 2026 Neon added serverless functions, S3-compatible object storage, and an AI gateway to its database. The interesting part is not any one feature, it is the through-line: everything branches with your data. Here is what shipped, what it competes with, and where the seams still show.
Neon vs Supabase in Production: We Benchmarked the Operations That Page You at 3am
Two benchmark sessions against Neon and Supabase Pro measured what spec sheets never show: compute resizes cost 39 seconds of real downtime on one platform and zero on the other, read replicas differ by 23x, and branch creation has a tail you should know about.
Neon vs Supabase Pricing: What the Same App Costs From Launch to Scale
We priced one application through five growth stages on both platforms using verified June 2026 list prices. The result is three distinct cost regimes, two crossover points, and a surprise: at scale the biggest line item is not the database.
Neon vs Supabase Free Tiers: We Benchmarked Both So You Don't Have To
We ran 320 timed operations against the Neon and Supabase free tiers from a same-region client: query latency, project creation, cold starts, and branching. The latency race is a tie, and the real differences are nothing like the marketing.
node-postgres Silently Ignores Your TLS Config When the URL Says sslmode
If your connection string contains sslmode=require, the pg library throws away the ssl options object where you loaded your CA certificate, and verification fails with "self-signed certificate in certificate chain". Here is the trap, the fix, and the v9 changes coming.