Date: 2025-05-15
Time: 15:00–15:50
Room: Breakout Room 3
Level: Intermediate
Distributed transactions are essential in today's IT systems, and a number of state-of-the-art methods, such as global transaction managers (GTMs) and clock-based algorithms, have been proposed. While these provide high consistency, they sometimes exceed practical requirements, so users need lightweight methods that are well-balanced for their workloads. Ideally, such methods should be implemented as extensions, but PostgreSQL lacks transactional extensibility, so its core must be forked.
A promising solution to this problem is the eXtensible Transaction Manager (XTM), which allows the replacement of core transactional APIs. Although proposed previously, XTM has yet to be implemented. This talk revisits XTM with a practical case study that demonstrates its potential to meet diverse user needs. The case study addresses inconsistency in a two-phase commit (2PC) protocol. Notably, the method relaxes the consistency to the minimum required level, ensuring its maintenance even when users bypass the coordinator and access shards directly. Experimental results using the SmallBank benchmark demonstrate its high throughput and low latency. Since balancing consistency and performance with meeting user-specific needs is crucial, this case study effectively highlights the need to rethink XTM.
In this talk, I will first give an overview of the well-known distributed transactional methods and their implementation in PostgreSQL. I will then review XTM in detail and highlight its potential. Next, I will describe the case study at the source code level and discuss what extensibility is currently missing and how XTM can solve it. Lastly, I will explore the impact of these improvements on PostgreSQL. By the end of this talk, attendees will gain a deeper understanding of XTM, learn how to tailor transactional methods to their specific needs, and join the renewed discussion on shaping the future of transactional extensibility.