PostgreSQL Source Code  git master
xlogprefetcher.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * xlogprefetcher.h
4  * Declarations for the recovery prefetching module.
5  *
6  * Portions Copyright (c) 2022, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * IDENTIFICATION
10  * src/include/access/xlogprefetcher.h
11  *-------------------------------------------------------------------------
12  */
13 #ifndef XLOGPREFETCHER_H
14 #define XLOGPREFETCHER_H
15 
16 #include "access/xlogdefs.h"
17 #include "access/xlogreader.h"
18 #include "access/xlogrecord.h"
19 
20 /* GUCs */
22 
23 /* Possible values for recovery_prefetch */
24 typedef enum
25 {
30 
31 struct XLogPrefetcher;
32 typedef struct XLogPrefetcher XLogPrefetcher;
33 
34 
35 extern void XLogPrefetchReconfigure(void);
36 
37 extern size_t XLogPrefetchShmemSize(void);
38 extern void XLogPrefetchShmemInit(void);
39 
40 extern void XLogPrefetchResetStats(void);
41 
43 extern void XLogPrefetcherFree(XLogPrefetcher *prefetcher);
44 
46 
47 extern void XLogPrefetcherBeginRead(XLogPrefetcher *prefetcher,
48  XLogRecPtr recPtr);
49 
51  char **errmsg);
52 
53 extern void XLogPrefetcherComputeStats(XLogPrefetcher *prefetcher);
54 
55 #endif
#define PGDLLIMPORT
Definition: c.h:1331
int errmsg(const char *fmt,...)
Definition: elog.c:904
XLogReaderState * reader
uint64 XLogRecPtr
Definition: xlogdefs.h:21
void XLogPrefetchResetStats(void)
void XLogPrefetcherComputeStats(XLogPrefetcher *prefetcher)
XLogRecord * XLogPrefetcherReadRecord(XLogPrefetcher *prefetcher, char **errmsg)
void XLogPrefetchReconfigure(void)
size_t XLogPrefetchShmemSize(void)
XLogPrefetcher * XLogPrefetcherAllocate(XLogReaderState *reader)
void XLogPrefetchShmemInit(void)
void XLogPrefetcherBeginRead(XLogPrefetcher *prefetcher, XLogRecPtr recPtr)
PGDLLIMPORT int recovery_prefetch
void XLogPrefetcherFree(XLogPrefetcher *prefetcher)
RecoveryPrefetchValue
@ RECOVERY_PREFETCH_OFF
@ RECOVERY_PREFETCH_ON
@ RECOVERY_PREFETCH_TRY
XLogReaderState * XLogPrefetcherGetReader(XLogPrefetcher *prefetcher)