pgsql: localbuf: Introduce FlushLocalBuffer()

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: localbuf: Introduce FlushLocalBuffer()
Date: 2025-03-16 02:18:20
Message-ID: E1ttda0-002gW5-13@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

localbuf: Introduce FlushLocalBuffer()

Previously we had two paths implementing writing out temporary table
buffers. For shared buffers, the logic for that is centralized in
FlushBuffer(). Introduce FlushLocalBuffer() to do the same for local buffers.

Besides being a nice cleanup on its own, it also makes an upcoming change
slightly easier.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4b4d33b9ea9ff6bdc813b5b7b1aa4a6a3a2a2d5c

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 22 +-----------
src/backend/storage/buffer/localbuf.c | 64 ++++++++++++++++++++---------------
src/include/storage/buf_internals.h | 1 +
3 files changed, 38 insertions(+), 49 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-03-16 10:32:42 pgsql: pg_createsubscriber: Remove some code bloat in the atexit() call
Previous Message Andrew Dunstan 2025-03-15 21:44:26 pgsql: Silence perl critic