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

From Andres Freund
Subject pgsql: localbuf: Introduce StartLocalBufferIO()
Date
Msg-id E1ttda0-002gW8-17@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
localbuf: Introduce StartLocalBufferIO()

To initiate IO on a shared buffer we have StartBufferIO(). For temporary table
buffers no similar function exists - likely because the code for that
currently is very simple due to the lack of concurrency.

However, the upcoming AIO support will make it possible to re-encounter a
local buffer, while the buffer already is the target of IO. In that case we
need to wait for already in-progress IO to complete. This commit makes it
easier to add the necessary code, by introducing StartLocalBufferIO().

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/771ba90298e2b79a94678c96f7960274a7896feb

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c   |  8 ++------
src/backend/storage/buffer/localbuf.c | 36 +++++++++++++++++++++++++++++++++++
src/include/storage/buf_internals.h   |  1 +
3 files changed, 39 insertions(+), 6 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