/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

chenhuijing.com
| | www.ramblingcode.dev

Collection of bite-sized posts and projects on web development - focusing mainly on Ruby, Linux and Javascript.
10.3 parsecs

Travel
| |
| | rcoh.me

A recent outage lead me to investigate Postgres unique constraints more deeply. Postgres implements unique constraints by creating a unique index - an index that can only contain unique values.1 It turns out that unique indices and concurrent transactions can interact in nasty and surprising ways. Before I get into the "why", here are the implications: When two transactions insert the same value into a unique index, one transaction will wait for the other transaction to finish before proceeding.
8.0 parsecs

Travel
| |
| | minhajuddin.com

So, you have a ton of records to update in a really large table. Say, you need to update 3 million records in a table with 100 million rows. And, let's also assume that you have a way of finding these
9.8 parsecs

Travel
| |
| | eltonminetto.dev

Let's start at the beginning. What is resilience? I like the definition in thispost:
29.0 parsecs

Travel
|