Skip to main content

One post tagged with "Nested transactions"

View All Tags

PostgreSQL subtransactions considered harmful

· 21 min read
Nikolay Samokhvalov

An opinionated overview of four cases against using PostgreSQL subtransactions​

💬 Hacker News discussion[1]​

💬 "Why we spent the last month eliminating PostgreSQL subtransactions" (GitLab)[2]​

This article discusses what subtransactions are, how to create them, and how widely they are used nowadays. Next, we try to understand why they have a terrible reputation among PostgreSQL experts who operate heavily loaded systems. We overview four problems that may arise in a Postgres database in which subtransactions are used, and load grows. In the end, we discuss the short-term and long-term options for PostgreSQL users willing to solve the ongoing or prevent future problems related to subtransactions.

Links

  1. [1] Hacker News discussion https://news.ycombinator.com/item?id=28374333
  2. [2] "Why we spent the last month eliminating PostgreSQL subtransactions" (GitLab) https://about.gitlab.com/blog/2021/09/29/why-we-spent-the-last-month-eliminating-postgresql-subtransactions/