aio: Add errcontext for processing I/Os for another backend
authorMelanie Plageman <[email protected]>
Tue, 1 Apr 2025 23:53:07 +0000 (19:53 -0400)
committerMelanie Plageman <[email protected]>
Tue, 1 Apr 2025 23:53:07 +0000 (19:53 -0400)
commitb3219c69fc1e161df8d380c464b3f2cce3b6cab9
tree174b07dc1ded069e257aae952e887b727c719dc1
parentb136db07c651e5048d44add0a01d5fc01b6fe0dc
aio: Add errcontext for processing I/Os for another backend

Push an ErrorContextCallback adding additional detail about the process
performing the I/O and the owner of the I/O when those are not the same.

For io_method worker, this adds context specifying which process owns
the I/O that the I/O worker is processing.

For io_method io_uring, this adds context only when a backend is
*completing* I/O for another backend. It specifies the pid of the owning
process.

Author: Melanie Plageman <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/rdml3fpukrqnas7qc5uimtl2fyytrnu6ymc2vjf2zuflbsjuul%40hyizyjsexwmm
src/backend/storage/aio/method_io_uring.c
src/backend/storage/aio/method_worker.c