summaryrefslogtreecommitdiff
path: root/src/include/storage/md.h
diff options
context:
space:
mode:
authorThomas Munro2020-04-08 01:36:45 +0000
committerThomas Munro2020-04-08 02:56:57 +0000
commit3985b600f57d75b9743d86430cb5c21370057a23 (patch)
treef367f4511386eeacf127a8e8b25afc9f8ea46101 /src/include/storage/md.h
parent981643dcdb70b6ce70d8a08417f71f465f236cb5 (diff)
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 <[email protected]> Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CA%2BhUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq%3DAovOddfHpA%40mail.gmail.com
Diffstat (limited to 'src/include/storage/md.h')
-rw-r--r--src/include/storage/md.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/storage/md.h b/src/include/storage/md.h
index ec7630ce3b7..07fd1bb7d06 100644
--- a/src/include/storage/md.h
+++ b/src/include/storage/md.h
@@ -28,7 +28,7 @@ extern bool mdexists(SMgrRelation reln, ForkNumber forknum);
extern void mdunlink(RelFileNodeBackend rnode, ForkNumber forknum, bool isRedo);
extern void mdextend(SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum, char *buffer, bool skipFsync);
-extern void mdprefetch(SMgrRelation reln, ForkNumber forknum,
+extern bool mdprefetch(SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum);
extern void mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
char *buffer);