PostgreSQL Source Code  git master
bgwriter.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * bgwriter.h
4  * Exports from postmaster/bgwriter.c and postmaster/checkpointer.c.
5  *
6  * The bgwriter process used to handle checkpointing duties too. Now
7  * there is a separate process, but we did not bother to split this header.
8  *
9  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
10  *
11  * src/include/postmaster/bgwriter.h
12  *
13  *-------------------------------------------------------------------------
14  */
15 #ifndef _BGWRITER_H
16 #define _BGWRITER_H
17 
18 #include "storage/block.h"
19 #include "storage/relfilenode.h"
20 #include "storage/smgr.h"
21 #include "storage/sync.h"
22 
23 
24 /* GUC options */
25 extern int BgWriterDelay;
26 extern int CheckPointTimeout;
27 extern int CheckPointWarning;
28 extern double CheckPointCompletionTarget;
29 
31 extern void CheckpointerMain(void) pg_attribute_noreturn();
32 
33 extern void RequestCheckpoint(int flags);
34 extern void CheckpointWriteDelay(int flags, double progress);
35 
36 extern bool ForwardSyncRequest(const FileTag *ftag, SyncRequestType type);
37 
38 extern void AbsorbSyncRequests(void);
39 
40 extern Size CheckpointerShmemSize(void);
41 extern void CheckpointerShmemInit(void);
42 
43 extern bool FirstCallSinceLastCheckpoint(void);
44 
45 #endif /* _BGWRITER_H */
bool FirstCallSinceLastCheckpoint(void)
void AbsorbSyncRequests(void)
#define pg_attribute_noreturn()
Definition: c.h:145
void CheckpointWriteDelay(int flags, double progress)
Definition: checkpointer.c:670
int CheckPointWarning
Definition: checkpointer.c:147
int CheckPointTimeout
Definition: checkpointer.c:146
bool ForwardSyncRequest(const FileTag *ftag, SyncRequestType type)
void CheckpointerMain(void) pg_attribute_noreturn()
Definition: checkpointer.c:183
void CheckpointerShmemInit(void)
Definition: checkpointer.c:860
Size CheckpointerShmemSize(void)
Definition: checkpointer.c:841
void BackgroundWriterMain(void) pg_attribute_noreturn()
Definition: bgwriter.c:94
int progress
Definition: pgbench.c:234
void RequestCheckpoint(int flags)
Definition: checkpointer.c:903
double CheckPointCompletionTarget
Definition: checkpointer.c:148
size_t Size
Definition: c.h:466
SyncRequestType
Definition: sync.h:23
int BgWriterDelay
Definition: bgwriter.c:64
Definition: sync.h:45