bgwriter.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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-2022, PostgreSQL Global Development Group
  10. *
  11. * src/include/postmaster/bgwriter.h
  12. *
  13. *-------------------------------------------------------------------------
  14. */
  15. #ifndef _BGWRITER_H
  16. #define _BGWRITER_H
  17. #include "storage/block.h"
  18. #include "storage/relfilenode.h"
  19. #include "storage/smgr.h"
  20. #include "storage/sync.h"
  21. /* GUC options */
  22. extern PGDLLIMPORT int BgWriterDelay;
  23. extern PGDLLIMPORT int CheckPointTimeout;
  24. extern PGDLLIMPORT int CheckPointWarning;
  25. extern PGDLLIMPORT double CheckPointCompletionTarget;
  26. extern void BackgroundWriterMain(void) pg_attribute_noreturn();
  27. extern void CheckpointerMain(void) pg_attribute_noreturn();
  28. extern void RequestCheckpoint(int flags);
  29. extern void CheckpointWriteDelay(int flags, double progress);
  30. extern bool ForwardSyncRequest(const FileTag *ftag, SyncRequestType type);
  31. extern void AbsorbSyncRequests(void);
  32. extern Size CheckpointerShmemSize(void);
  33. extern void CheckpointerShmemInit(void);
  34. extern bool FirstCallSinceLastCheckpoint(void);
  35. #endif /* _BGWRITER_H */