Schedule
Deep dive into resource manager, error and interrupt handling.
Date: 2026-05-20
Time: 16:00–16:25
Room: Labatt
Level: Intermediate
I will describe each of the following aspects of PostgreSQL code.
This will include the scenarios in which these modules are used,
best practices, detailed usage examples and, where applicable, suggestions for improving their implementation.
- Resource manager - An in-depth look at the resource management infrastructure, including the ResourceOwner API, lifecycle tracking of various resources, the creation and management of ResownerObjects, and the roles played by transactions and portals.
- Error handling - A detailed walkthrough of the execution flow when an ERROR, FATAL, or PANIC is raised in PostgreSQL, including how control is transferred and how cleanup is handled.
This will include an explanation of START_CRIT_SECTION() - END_CRIT_SECTION() code block, highlighting its purpose and describing error handling from a critical section.
- Interrupt handling - An explanation of PostgreSQL’s interrupt-handling mechanisms, including the role of CHECK_FOR_INTERRUPTS(). It will also include a discussion on providing a common interface for different types of interrupts as an enhancement to the existing infrastructure.
Additionally, I will focus on unifying error handling across process types. This includes analyzing the differences in top-level sigsetjmp implementation among background processes, auxiliary processes, and client backends, and proposing approaches to unify these behaviors.
Speaker
Rahila Syed