Header And Logo

PostgreSQL
| The world's most advanced open source database.

bgwriter.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * bgwriter.h
00004  *    Exports from postmaster/bgwriter.c and postmaster/checkpointer.c.
00005  *
00006  * The bgwriter process used to handle checkpointing duties too.  Now
00007  * there is a separate process, but we did not bother to split this header.
00008  *
00009  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00010  *
00011  * src/include/postmaster/bgwriter.h
00012  *
00013  *-------------------------------------------------------------------------
00014  */
00015 #ifndef _BGWRITER_H
00016 #define _BGWRITER_H
00017 
00018 #include "storage/block.h"
00019 #include "storage/relfilenode.h"
00020 
00021 
00022 /* GUC options */
00023 extern int  BgWriterDelay;
00024 extern int  CheckPointTimeout;
00025 extern int  CheckPointWarning;
00026 extern double CheckPointCompletionTarget;
00027 
00028 extern void BackgroundWriterMain(void) __attribute__((noreturn));
00029 extern void CheckpointerMain(void) __attribute__((noreturn));
00030 
00031 extern void RequestCheckpoint(int flags);
00032 extern void CheckpointWriteDelay(int flags, double progress);
00033 
00034 extern bool ForwardFsyncRequest(RelFileNode rnode, ForkNumber forknum,
00035                     BlockNumber segno);
00036 extern void AbsorbFsyncRequests(void);
00037 
00038 extern Size CheckpointerShmemSize(void);
00039 extern void CheckpointerShmemInit(void);
00040 
00041 extern bool FirstCallSinceLastCheckpoint(void);
00042 
00043 #endif   /* _BGWRITER_H */