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-2024, 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/relfilelocator.h"
20 #include "storage/smgr.h"
21 #include "storage/sync.h"
22 
23 
24 /* GUC options */
25 extern PGDLLIMPORT int BgWriterDelay;
29 
30 extern void BackgroundWriterMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
31 extern void CheckpointerMain(char *startup_data, size_t startup_data_len) 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 */
PGDLLIMPORT int BgWriterDelay
Definition: bgwriter.c:57
bool ForwardSyncRequest(const FileTag *ftag, SyncRequestType type)
void BackgroundWriterMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition: bgwriter.c:87
void AbsorbSyncRequests(void)
PGDLLIMPORT int CheckPointTimeout
Definition: checkpointer.c:136
void CheckpointerShmemInit(void)
Definition: checkpointer.c:909
PGDLLIMPORT int CheckPointWarning
Definition: checkpointer.c:137
bool FirstCallSinceLastCheckpoint(void)
PGDLLIMPORT double CheckPointCompletionTarget
Definition: checkpointer.c:138
void CheckpointerMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition: checkpointer.c:173
void RequestCheckpoint(int flags)
Definition: checkpointer.c:952
void CheckpointWriteDelay(int flags, double progress)
Definition: checkpointer.c:722
Size CheckpointerShmemSize(void)
Definition: checkpointer.c:890
#define PGDLLIMPORT
Definition: c.h:1319
#define pg_attribute_noreturn()
Definition: c.h:220
size_t Size
Definition: c.h:608
static int progress
Definition: pgbench.c:261
Definition: sync.h:51
SyncRequestType
Definition: sync.h:24
const char * type