Skip to main content

One post tagged with "Nested transactions"

View All Tags

PostgreSQL subtransactions considered harmful

ยท 27 min read
Nikolay Samokhvalov

An opinionated overview of four cases against using PostgreSQL subtransactionsโ€‹

๐Ÿ’ฌ Hacker News discussionโ€‹

๐Ÿ’ฌ "Why we spent the last month eliminating PostgreSQL subtransactions" (GitLab)โ€‹

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.