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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/dd6f2618f681e699cb5f2122a3f036beaa89f992
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 32 +++++++++-----------------------
src/backend/storage/buffer/localbuf.c | 29 ++++++++++++++++++++++++++---
src/include/storage/buf_internals.h | 2 ++
3 files changed, 37 insertions(+), 26 deletions(-)