codekingpro/portable-devtools
114k
1/*-------------------------------------------------------------------------2 *3 * bgwriter.h4 * Exports from postmaster/bgwriter.c and postmaster/checkpointer.c.5 *6 * The bgwriter process used to handle checkpointing duties too. Now7 * there is a separate process, but we did not bother to split this header.8 *9 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group10 *11 * src/include/postmaster/bgwriter.h12 *13 *-------------------------------------------------------------------------14 */15#ifndef _BGWRITER_H16#define _BGWRITER_H17 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 */25extern PGDLLIMPORT int BgWriterDelay;26extern PGDLLIMPORT int CheckPointTimeout;27extern PGDLLIMPORT int CheckPointWarning;28extern PGDLLIMPORT double CheckPointCompletionTarget;29 30extern void BackgroundWriterMain(void) pg_attribute_noreturn();31extern void CheckpointerMain(void) pg_attribute_noreturn();32 33extern void RequestCheckpoint(int flags);34extern void CheckpointWriteDelay(int flags, double progress);35 36extern bool ForwardSyncRequest(const FileTag *ftag, SyncRequestType type);37 38extern void AbsorbSyncRequests(void);39 40extern Size CheckpointerShmemSize(void);41extern void CheckpointerShmemInit(void);42 43extern bool FirstCallSinceLastCheckpoint(void);44 45#endif /* _BGWRITER_H */46 