Indexing a 4-billion-row Postgres table without downtime
How we used CREATE INDEX CONCURRENTLY and a phased rollout to add a multi-column index without a maintenance window.
Background
This is a placeholder body, seeded automatically. Edit this post in /admin/posts to replace it with the real article.
What we did
- Step one — analysed the situation
- Step two — proposed a plan
- Step three — shipped it
What we learned
Sometimes the obvious answer is the right one — but you only know that after testing the non-obvious answers first.
A short code sample:
function helloPandasofts(name: string) {
return `Hi ${name}, welcome to the studio journal.`;
}
Wrapping up
That's the gist. Read more in the studio journal or say hello.