Database Migration Debugging and Cross-Database Compatibility
Why we spent the last month eliminating PostgreSQL subtransactions

Why we spent the last month eliminating PostgreSQL subtransactions

9/29/2021 · Grzegorz Bizon

What this post added

This post details the investigation and resolution of database stalls on GitLab.com caused by PostgreSQL subtransactions (`SAVEPOINT` queries). It explains the symptoms observed (CI/CD runner errors, build backlogs, `LWLocks`, `SubtransControlLock` contention), the underlying mechanism of subtransactions and `SubtransControlLock`, and the debugging process using enhanced observability and application instrumentation. The solution involved identifying and eliminating all `SAVEPOINT` calls from the codebase to prevent `suboverflow` and improve replica performance.

Read the original post ↗