Topic Cluster Archive

Databases

← All Articles

Showing 6 articles in Databases

Databases26 Aug 2026

Optimistic vs Pessimistic Locking in NestJS: Pick One, Not Both

A practical breakdown of optimistic versioning and SELECT FOR UPDATE in NestJS and PostgreSQL, with real code and a clear recommendation for wallets, inventory, and reservations.

6 min readRead ↗
Databases26 Aug 2026

Zero-Downtime PostgreSQL Migrations in NestJS

Safely execute PostgreSQL schema migrations in NestJS without locking production tables. Master concurrent index builds and expand-and-contract renames.

6 min readRead ↗
Databases21 Aug 2026

Why Your NestJS Aggregation Pipeline Is Slow (It's Not Your Indexes)

Most MongoDB aggregation slowdowns in NestJS come from stage order, not missing indexes. Here's how to fix $lookup memory spikes and force IXSCAN.

5 min readRead ↗
Databases19 Aug 2026

Why Your Next.js App Keeps Hitting "Too Many Connections" in Production

A practical breakdown of why serverless Next.js apps exhaust PostgreSQL connections, and the three fixes that actually work — singleton clients, transaction-mode pooling, and HTTP drivers.

6 min readRead ↗
Databases15 Aug 2026

MongoDB Change Streams in NestJS Keep Dropping Events. Here's the Fix

Change Streams look production-ready in a demo and fall apart on deploy day. Here's how to persist resume tokens, batch under load, and survive replica set elections in NestJS.

6 min readRead ↗
Databases14 Aug 2026

Running pgvector in Production Without It Falling Over

How to configure HNSW indexes, tune maintenance_work_mem and shared_buffers, and add hybrid search so pgvector holds up under real RAG traffic.

6 min readRead ↗