From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Support PrefetchBuffer() in recovery. |
Date: | 2020-04-08 02:58:37 |
Message-ID: | E1jM0vF-0003a4-RP@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Support PrefetchBuffer() in recovery.
Provide PrefetchSharedBuffer(), a variant that takes SMgrRelation, for
use in recovery. Rename LocalPrefetchBuffer() to PrefetchLocalBuffer()
for consistency.
Add a return value to all of these. In recovery, tolerate and report
missing files, so we can handle relations unlinked before crash recovery
began. Also report cache hits and misses, so that callers can do faster
buffer lookups and better I/O accounting.
Reviewed-by: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/CA%2BhUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq%3DAovOddfHpA%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3985b600f57d75b9743d86430cb5c21370057a23
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 125 +++++++++++++++++++++++-----------
src/backend/storage/buffer/localbuf.c | 22 +++---
src/backend/storage/smgr/md.c | 9 ++-
src/backend/storage/smgr/smgr.c | 10 ++-
src/include/storage/buf_internals.h | 5 +-
src/include/storage/bufmgr.h | 16 ++++-
src/include/storage/md.h | 2 +-
src/include/storage/smgr.h | 2 +-
8 files changed, 134 insertions(+), 57 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-04-08 02:58:55 | Re: pgsql: Allow users to limit storage reserved by replication slots |
Previous Message | Michael Paquier | 2020-04-08 02:36:02 | Re: pgsql: Allow users to limit storage reserved by replication slots |