Add callback for I/O error messages in SLRUs
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-03-13T14:21:06Z
Releases:
19 (unreleased)
Add callback for I/O error messages in SLRUs Historically, all SLRUs were addressed by transaction IDs, but that hasn't been true for a long time. However, the error message on I/O error still always talked about accessing a transaction ID. This commit adds a callback that allows subsystems to construct their own error messages, which can then correctly refer to a transaction ID, multixid or whatever else is used to address the particular SLRU. Author: Maxim Orlov <orlovmg@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Discussion: https://www.postgresql.org/message-id/CACG=ezZZfurhYV+66ceubxQAyWqv9vaUi0yoO4-t48OE5xc0DQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/clog.c | modified | +13 −4 |
| src/backend/access/transam/commit_ts.c | modified | +11 −2 |
| src/backend/access/transam/multixact.c | modified | +48 −17 |
| src/backend/access/transam/slru.c | modified | +43 −36 |
| src/backend/access/transam/subtrans.c | modified | +12 −2 |
| src/backend/commands/async.c | modified | +14 −6 |
| src/backend/storage/lmgr/predicate.c | modified | +12 −2 |
| src/include/access/slru.h | modified | +13 −2 |
| src/test/modules/test_slru/expected/test_slru.out | modified | +4 −0 |
| src/test/modules/test_slru/sql/test_slru.sql | modified | +3 −0 |
| src/test/modules/test_slru/test_slru--1.0.sql | modified | +1 −1 |
| src/test/modules/test_slru/test_slru.c | modified | +12 −3 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- Rework SLRU I/O errors handle 9 messages · 2026-02-26 → 2026-03-13