]> granicus.if.org Git - postgresql/blob - src/include/postmaster/bgwriter.h
Centralize definition of integer limits.
[postgresql] / src / include / postmaster / bgwriter.h
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-2015, 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
21
22 /* GUC options */
23 extern int      BgWriterDelay;
24 extern int      CheckPointTimeout;
25 extern int      CheckPointWarning;
26 extern double CheckPointCompletionTarget;
27
28 extern void BackgroundWriterMain(void) pg_attribute_noreturn;
29 extern void CheckpointerMain(void) pg_attribute_noreturn;
30
31 extern void RequestCheckpoint(int flags);
32 extern void CheckpointWriteDelay(int flags, double progress);
33
34 extern bool ForwardFsyncRequest(RelFileNode rnode, ForkNumber forknum,
35                                         BlockNumber segno);
36 extern void AbsorbFsyncRequests(void);
37
38 extern Size CheckpointerShmemSize(void);
39 extern void CheckpointerShmemInit(void);
40
41 extern bool FirstCallSinceLastCheckpoint(void);
42
43 #endif   /* _BGWRITER_H */