bgwriter.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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-2016, 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. /* GUC options */
  20. extern int BgWriterDelay;
  21. extern int CheckPointTimeout;
  22. extern int CheckPointWarning;
  23. extern double CheckPointCompletionTarget;
  24. extern void BackgroundWriterMain(void) pg_attribute_noreturn();
  25. extern void CheckpointerMain(void) pg_attribute_noreturn();
  26. extern void RequestCheckpoint(int flags);
  27. extern void CheckpointWriteDelay(int flags, double progress);
  28. extern bool ForwardFsyncRequest(RelFileNode rnode, ForkNumber forknum,
  29. BlockNumber segno);
  30. extern void AbsorbFsyncRequests(void);
  31. extern Size CheckpointerShmemSize(void);
  32. extern void CheckpointerShmemInit(void);
  33. extern bool FirstCallSinceLastCheckpoint(void);
  34. #endif /* _BGWRITER_H */