| ▲ | scottlamb 9 hours ago | |||||||||||||||||||||||||||||||||||||||||||||||||
It'd be interesting to see a version of this that tries all the different interleavings of PostgreSQL operations between the two (or N) tasks. https://crates.io/crates/loom does something like this for Rust code that uses synchronization primitives. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | lirbank 9 hours ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Interesting! The barrier approach is more targeted: you specify the exact interleaving you want to test rather than exploring all of them. Trade-off is you need to know which interleavings matter, but you get deterministic tests that run against a real database instead of a simulated runtime. Exploring exhaustive interleaving testing against a real Postgres instance could be a fun follow-up - I'd be curious if it's practical. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||