pgsql: localbuf: Introduce TerminateLocalBufferIO() - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: localbuf: Introduce TerminateLocalBufferIO()
Date
Msg-id E1ttda0-002gW3-0z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Silence perl critic
Next
From: Michael Paquier
Date:
Subject: pgsql: pg_createsubscriber: Remove some code bloat in the atexit() call