RSS Amplifier

Blog

Richard Yen

richyen.comRSS feed ↗10 posts

Latest posts

Are You .ready?

A practical guide to what .ready and .done mean, and why WAL sticks around Introduction It is 9:12 a.m. on a Monday. Someone on your team opens pg_wal/archive_status/ during a storage scare and sees a long list of files ending in .ready . They ask the question many of us have asked at least once: “Is replication broken?” Streaming replicas still look mostly fine, but .ready files keep piling up,…

Disaster Recovery is a Process, Not a Tool (Part 2)

Picking Up Where We Left Off In the previous post , I tried to lay out the framing half of this material: what actually counts as a disaster, why preparation and prevention aren’t the same as recovery, and how RPO and RTO end up being conversations with leadership rather than numbers an infrastructure team gets to declare on its own. That part is largely about understanding the problem. This part…

pg_stats: How Postgres Internal Stats Work

Introduction I recently had the privilege of speaking at POSETTE 2026 about pg_stats and how Postgres internal statistics work ( YouTube Recording ). This post is a written companion to that talk – aimed at giving you a working understanding of what pg_stats is, how it’s populated, and how it shapes the decisions the query planner makes on your behalf. Imagine a customers table that looks roughly…

Disaster Recovery is a Process, Not a Tool (Part 1)

The Landscape Has Changed When I was at Turnitin, we were still kind of riding the tail end of the dot-com boom. People were rushing to ship things, and brief outages were not exactly good , but they were considered a normal part of running software on the internet. If the site was down for a few minutes, you’d shrug, dig in, and fix it. That’s not really the world we live in anymore. Uptime is…

PGDay Boston 2026

Introduction PGDay Boston 2026 was a rewarding reminder of why I value the PostgreSQL community so much. It was delightful to reconnect with familiar faces, meet new people, and finally put some faces to names for the first time. One of the best parts of the day was the sense that this community is larger than any one employer or project. It is built on shared curiosity, shared responsibility, and…

Foreign Tables and Materialized Views: A Dynamic Duo

Introduction I recently wrote a post about WAL log shipping and how a standby built on log shipping is a great way to give data analysts production data without putting the primary at risk. Having access to the production data in this way is great, but it’s read-only. How can we create views of this data for better analytics work? I want to make the case today that Foreign Data Wrappers and…

XID Wraparound's Equally-Evil Twin

Introduction If you’ve been running PostgreSQL for any length of time, you’ve probably heard about transaction ID (XID) wraparound. It’s one of the most well-known maintenance concerns in Postgres, and there’s no shortage of blog posts, conference talks, and war stories about it. But there’s a quieter, less-discussed cousin that can cause the exact same kind of outage: MultiXact ID wraparound .…

Making JSONB More Queryable with Generated Columns

Introduction Over the past year, I’ve worked in a handful of contexts managing large volumes of data stored as JSONB in PostgreSQL. The scenario is common: users appreciate the flexibility of a document-oriented storage model, avoiding the need to predefine schemas or constantly migrate table structures as their data requirements evolve. JSONB documents can be deeply nested with numerous optional…

Potential Consequences of Using Postgres as a Job Queue

This post was originally published on the Microsoft Tech Community Blog . Introduction At small scale, using Postgres as a job queue is totally fine, and I’d even say it’s the right call. Fewer moving parts, one less system to manage, ACID guarantees on your jobs. What’s not to love? The problem is that “small scale” has a ceiling, and the ceiling is lower than most people expect. When you’ve got…

Understanding Bitmap Heap Scans in PostgreSQL

Introduction When people first start reading PostgreSQL execution plans, they quickly learn a few common scan types: Seq Scan , Index Scan , Index Only Scan . But eventually another one appears that is less obvious: Bitmap Heap Scan , which is almost always accompanied by Bitmap Index Scan . At first glance, it sounds like two scans on the same table – a very inefficient choice?! But bitmap scans…