From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support PrefetchBuffer() in recovery.
Date: Wed, 08 Apr 2020 02:58:37 +0000
Message-ID: <E1jM0vF-0003a4-RP@gemulon.postgresql.org> (raw)
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@2ndquadrant.com>
Reviewed-by: Andres Freund <andres@anarazel.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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org
Subject: Re: pgsql: Support PrefetchBuffer() in recovery.
In-Reply-To: <E1jM0vF-0003a4-RP@gemulon.postgresql.org>
References: <E1jM0vF-0003a4-RP@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox