/explore
|
You are here |
chenhuijing.com | ||
| | | | |
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. |
|
| | | | | ||
| | | | |
www.ramblingcode.dev
Collection of bite-sized posts and projects on web development - focusing mainly on Ruby, Linux and Javascript. |
|
| | | | | ||
| | | | |
andyatkinson.com
Manually Fixing a Rails Migration | Software Engineer, Author, High Performance PostgreSQL for Rails This tip is a recipe for how to recover from a Rails migration that failed to apply in production. This process could work for any SQL migration. The example below is for an index added to a table. |
|
| | | | | ||
| | | | |
buttondown.com
One thing about concurrency control ("isolation") in a transactional database is that it incurs costs, and there's broadly two kinds of such costs. The first... |
|
| | | |||