
Postgres Dead Tuples Not Being Removed: Fixes (2026)
Postgres dead tuples not being removed? VACUUM can only delete rows older than the xmin horizon. Here is how to find what holds it back, and how to fix it.
Server-side development, APIs, databases, Node.js, Python, microservices, and backend architecture
66 posts

Postgres dead tuples not being removed? VACUUM can only delete rows older than the xmin horizon. Here is how to find what holds it back, and how to fix it.

BullMQ worker not processing jobs? Work through queue name and prefix, maxRetriesPerRequest, stalled-job locks, and the v6 ioredis peer dependency change.
Postgres 18 lets MERGE RETURNING return old and new row values in one query. See merge_action(), the xmax alternative, and verified Node.js/TypeScript code.
Add a correlation ID to every log line in Node.js with built-in AsyncLocalStorage and Express — typed, zero-dependency, plus pino and downstream propagation.
Build a production Node.js circuit breaker in TypeScript with opossum: closed, open, half-open states, fallbacks, errorFilter, timeouts, and verified output.
Implement Postgres row-level security for multi-tenant apps with node-postgres: enable RLS, write current_setting policies, and avoid the pool-leak footgun.
Query nested relations in Drizzle ORM with db.query and the with operator: filter and limit child rows, run many-to-many joins, plus the v1 vs v2 changes.
Build a fully type-safe tRPC v11 API in TypeScript: a standalone server, a vanilla client, Zod validation, and error handling. No framework, all runnable.
Use Postgres 18's built-in uuidv7() for primary keys: default DDL, uuidv7 vs uuidv4 vs bigint, migrating off uuidv4, and the timestamp-leak caveat to know.
Connect Valkey from Node.js and TypeScript with the iovalkey client: Docker setup, typed caching, pipelines, pub/sub, error handling, and graceful shutdown.
Build a typed, production gRPC service in Node.js and TypeScript: server streaming, deadlines, the error model, and health checks. Runnable 2026 guide.
Should you use Postgres LISTEN/NOTIFY for a job queue? The global commit lock, 8000-byte payload cap, PgBouncer limits, and safer SKIP LOCKED patterns.
Build fast cursor pagination on Postgres with Node.js and TypeScript: keyset queries, a compound (created_at, id) tiebreaker, and opaque base64url cursors.
Make POST and PATCH retry-safe. Build a production idempotency-key layer in TypeScript on Node 24 with Fastify 5 and Postgres 18: atomic claims, 409s, replays.
Build a durable NATS JetStream worker in TypeScript on Node 24: create a stream, a pull consumer with explicit acks, backoff retries, and a dead-letter queue.
Send Postgres-backed pg-boss 12 jobs inside a Drizzle ORM transaction with the fromDrizzle adapter, retries, dead letters, and cron schedules.
Build resilient Hono middleware that fails open or fails closed when Redis is down: auth, feature flags, rate limits, plus a typed TypeScript circuit breaker.
Add production rate limiting to a Node.js API with Upstash Redis sliding windows: reusable Hono middleware, 429 + Retry-After headers, multi-tier limits.
Tutorial: install pg_partman 5.4.3 + pg_cron on Postgres 18.4, configure daily range partitions with retention, automate maintenance, troubleshoot.
Production pg-boss tutorial. Queue jobs in Postgres from Node.js 24 with TypeScript, retries, dead-letter queues, cron, and graceful shutdown.
Upgrade Postgres 17 to 18.3 with zero downtime using pg_createsubscriber and logical replication. Docker walkthrough with sequences, cutover, rollback.
Build a production htmx kanban with TypeScript, Express 5, and SSE live updates. 2026 step-by-step tutorial—real code, no React, every version pinned.
Hands-on 2026 guide: PgBouncer 1.25.1 in front of Postgres 18, then swap to Supabase Supavisor — transaction pooling, prepared statements, and pitfalls.
Hands-on 2026 tutorial: build a real-time online-presence system on Postgres 18 LISTEN/NOTIFY with Node.js, Express, and ws — no Redis, no broker, just SQL.
Python best practices for 2026: pyproject.toml, uv, Ruff, type hints, pytest, free-threaded 3.14, structured logging, and security patterns for clean, fast, shippable code.
Hands-on 2026 tutorial: build a tiny, secure Distroless Python container for a FastAPI app using uv 0.11.8, multi-stage builds, and a non-root runtime user.
SQL RIGHT JOIN mastered: when to use it over LEFT JOIN, real reporting examples, edge cases in Postgres/MySQL/SQLite, and why it's rarely the right default.
Learn how to automate text processing at scale using Python, modern tooling, and best practices for performance, security, and maintainability.
Server-Sent Events (SSE) in 2026: one-way server→client streams over HTTP. Live dashboards, notifications, LLM streaming — when to pick SSE over WebSockets.
Unit testing for reliable code: isolation, determinism, mocking, dependency injection, and the test pyramid shape that actually survives a growing codebase.
A deep, hands-on guide to selecting the right NoSQL database for your application — covering types, trade-offs, performance, security, and real-world use cases.
Learn how to integrate cryptocurrency platforms securely and efficiently — from architecture design to API integration, scalability, and monitoring.
Build real-time, low-carbon dApps with Server-Sent Events: cheaper than WebSockets, greener than polling, and plenty for collaboration and notification UIs.
Backend architecture in 2026: monolith, modular monolith, microservices, serverless, event-driven. Trade-offs, failure modes, and how to evolve between them.
Learn how to design, implement, and optimize Redis caching patterns for high-performance, scalable applications — from cache-aside to write-through and beyond.
SQLite in 2026, beyond embedded: edge compute, AI inference caching, local-first apps on Turso and Cloudflare D1. Why it's the database quietly powering 2026.
Rust for systems programming: ownership, borrowing, and zero-cost abstractions that deliver C-level speed with memory safety — and where it pays off in 2026.
A deep dive into how Django powers modern backend APIs — from REST to GraphQL — with practical examples, performance insights, and production-ready practices.
A deep, practical dive into backend web development — from architecture and APIs to scalability, security, and real-world production insights.
A deep, practical guide to building, scaling, and securing full stack applications using MongoDB, Express, React, and Node.js — from architecture to deployment.
Build a lightweight backend with PocketBase: bundled database, auth, and admin UI in one binary. Local-first deploy, real-time subscriptions, and when it fits.
JavaScript async patterns in 2026: callbacks → promises → async/await → structured concurrency. Event loop internals and real performance wins in practice.
Python power moves for your first real project: pyproject.toml, venvs, type hints, structured logging, tests, and the patterns that survive a year of growth.
SQL vs NoSQL in 2026: PostgreSQL, MySQL, MongoDB, Cassandra, DynamoDB. Consistency, schema flexibility, scaling, and when each actually fits your workload.
A comprehensive beginner's guide to algorithms, explained in a warm, approachable way with real examples, insights from Lisp, and step-by-step exploration.
Prepare for coding interviews with this in-depth, friendly guide that covers strategies, pitfalls, and real-world insights into technical interviews.
SQL from beginner to advanced queries: CRUD, JOINs, subqueries, CTEs, Window Functions, indexes — covering Postgres, MySQL, and SQLite (most examples are portable; vendor-specific differences are noted where they apply).
Python from scratch in 2026: variables, data types, control flow, functions, OOP, comprehensions, and the Pythonic patterns that separate beginners from pros.
Backend development in depth: servers, databases, APIs, auth, caching, and architectural choices that decide whether your app scales or buckles under load.
Web development for beginners in 2026: HTML, CSS, JavaScript, Git, Node, then React and a backend. The shortest real path from zero to full-stack shipping.
API development guide: REST, GraphQL, gRPC, tRPC compared. Auth flows, versioning, documentation, rate limits, and the patterns production teams actually use.
APIs explained with diagrams: what an API is, REST vs. GraphQL vs. gRPC, auth flows, rate limits, and how integrations really work under the hood.
API development explained: REST, GraphQL, gRPC, and tRPC side by side. Auth, versioning, docs, and when to pick each — with a minimal working example.
Remove punctuation from strings: Python translate(), regex, or unicodedata. JavaScript replace() with regex. Performance benchmarks and edge cases.
SQL from zero — SELECT, JOIN, GROUP BY, window functions, CTEs. Hands-on exercises using real tables; works in Postgres, modern SQLite, and MySQL 8.0+.
Dynamic programming with worked examples: memoization, tabulation, classic LeetCode patterns, and when DP beats greedy, divide-and-conquer, or brute force.
Project Euler problems 1-5: divisibility, Fibonacci, primes, palindromes, LCM. See brute-force vs optimized Python solutions with complexity analysis.
Solve Project Euler problems 11-15: grid products, divisors, Collatz sequences, lattice paths. Dynamic programming and combinatorics with Python code.
Solve Project Euler problems 6-10 with Python: sums of squares, prime generation, digit products, Pythagorean triples, sieve algorithms. Full explanations.
Python for absolute beginners in 2026 — install Python 3.13+, use uv for packaging, write your first functions, and run real scripts with zero prior experience.
API types, tools, and best practices for 2026. REST vs. GraphQL vs. gRPC, OpenAPI, Postman, rate limiting, auth patterns, and observability that scales.
Practical SQL guide: where to start, what to learn first, and the core query patterns every developer uses. Core SQL is portable across Postgres, SQLite, and MySQL; vendor-specific extensions (JSONB, etc.) are flagged as such.
Python for all ages: kids use Turtle graphics, teens build games, adults transition to data science. Accessible tools and resources for every learner.
Master Python with best practices: type hints, virtual environments, modern tooling. Complete guide from setup to professional coding habits.
Remove first and last characters from a string — Python slice vs. JavaScript slice/substring. Edge cases, Unicode handling, and TypeScript-typed examples.
Web scraping in 2026: ethical practices, robots.txt, BeautifulSoup, Scrapy, Playwright. Handling JS-heavy sites, rate limits, and cleaning messy data.