localbuf: Introduce TerminateLocalBufferIO()

Andres Freund <andres@anarazel.de>

Commit: dd6f2618f681e699cb5f2122a3f036beaa89f992
Author: Andres Freund <andres@anarazel.de>
Date: 2025-03-16T02:07:48Z
Releases: 18.0
localbuf: Introduce TerminateLocalBufferIO()

Previously TerminateLocalBufferIO() was open-coded in multiple places, which
doesn't seem like a great idea. While TerminateLocalBufferIO() currently is
rather simple, an upcoming patch requires additional code to be added to
TerminateLocalBufferIO(), making this modification particularly worthwhile.

For some reason FlushRelationBuffers() previously cleared BM_JUST_DIRTIED,
even though that's never set for temporary buffers. This is not carried over
as part of this change.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/CAAKRu_b9anbWzEs5AAF9WCvcEVmgz-1AkHSQ-CLLy-p7WHzvFw@mail.gmail.com

Files

Discussion

  • AIO v2.0 213 messages · 2024-09-01 → 2025-07-29