Brandur Leach
·
2026-05-31T12:41:38+02:00
Last week I wrote about leaving Stainless and my intention to work on building my side project River into a small, sustainable business. When I sent that letter, a few people asked about my thought process in trying to r...
Brandur Leach
·
2026-03-27T08:11:08-07:00
Fifteen years ago, when some colleagues and I were building Heroku’s V3 API, we set an ambitious goal: the public API should be powerful enough to run our own dashboard. No private endpoints, no escape hatches. It...
Brandur Leach
·
2024-05-28T20:50:47+02:00
Author’s note: This is a longer piece that starts off with exposition into the nature of the N+1 query problem. If you’re already well familiar with it, you may want to skip my description of N+1 to a story involvi...
Brandur Leach
·
2024-05-06T07:54:07+02:00
Listen/notify in Postgres is an incredible feature that makes itself useful in all kinds of situations. I’ve been using it a long time, started taking it for granted long ago, and was somewhat shocked recently look...
Brandur Leach
·
2024-05-05T08:21:27+02:00
Go’s JSON library provides the option DisallowUnknownFields which even if not intuitively obvious, is handy for adding a layer of improved DX to web APIs. As the name would suggest, it causes a decoder to error whe...
Brandur Leach
·
2023-11-20T06:18:48-08:00
Years ago I wrote about my trouble with a job queue in Postgres, in which table bloat caused by long-running queries slowed down the workers’ capacity to lock jobs as they hunted across millions of dead tuples tryi...
Brandur Leach
·
2023-08-26T13:48:45-07:00
One of Go’s best features is not only that it does parallelism well, but that it’s deeply baked in. It’s best exemplified by primitives like goroutines and their dead simple ease of use, but extends all...
Brandur Leach
·
2022-07-19T16:49:13Z
Anyone who’s seen a couple different production database environments is likely familiar with the “soft deletion” pattern – instead of deleting data directly via DELETE statement, tables get an ex...
Brandur Leach
·
2021-09-10T15:55:19Z
One of the major revelations for almost every new user to Postgres is that there’s no technical advantage of specifying columns as varchar(n) compared to just using bound-less text. Not only is the text type provid...
Brandur Leach
·
2021-09-08T16:49:02Z
After a few months of research and experimentation with running a heavily DB-dependent Go app, we’ve arrived at the conclusion that sqlc is the figurative Correct Answer when it comes to using Postgres (and probabl...
Brandur Leach
·
2021-02-16T15:16:18Z
For years, like most of the rest of the internet, I’ve been using Google Analytics to measure traffic to this site without thinking about it too much. To me, it’s never been anything more than a glorified hit...
Brandur Leach
·
2020-12-01T20:06:51Z
Big data has an unfortunate tendency to get messy. A few years in, a growing database that use to be small, lean, and well-designed, has better odds than not of becoming something large, bloated, and with best practices...
Brandur Leach
·
2019-08-07T16:50:44Z
A few months ago, I wrote about how SortSupport works in Postgres to vastly speed up sorting on large data types 1 like numeric or text, and varchar. It works by generating abbreviated keys for values that are representa...
Brandur Leach
·
2019-06-04T21:54:26Z
Many of us in technology-adjacent circles have been grumbling for years about the continued centralization of the web. The overwhelming trend has been for content to gravitate towards the internet’s Great Walled Ga...
Brandur Leach
·
2019-05-28T13:57:17Z
For the last couple weeks I’ve been making a few upgrades to the backend that generates this site (previously), with an aim on rebuilding it to be faster, more stable, and more efficient. The source is custom, and...