2
0

startup.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*-------------------------------------------------------------------------
  2. *
  3. * startup.h
  4. * Exports from postmaster/startup.c.
  5. *
  6. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  7. *
  8. * src/include/postmaster/startup.h
  9. *
  10. *-------------------------------------------------------------------------
  11. */
  12. #ifndef _STARTUP_H
  13. #define _STARTUP_H
  14. /*
  15. * Log the startup progress message if a timer has expired.
  16. */
  17. #define ereport_startup_progress(msg, ...) \
  18. do { \
  19. long secs; \
  20. int usecs; \
  21. if (has_startup_progress_timeout_expired(&secs, &usecs)) \
  22. ereport(LOG, errmsg(msg, secs, (usecs / 10000), __VA_ARGS__ )); \
  23. } while(0)
  24. extern PGDLLIMPORT int log_startup_progress_interval;
  25. extern void HandleStartupProcInterrupts(void);
  26. extern void StartupProcessMain(void) pg_attribute_noreturn();
  27. extern void PreRestoreCommand(void);
  28. extern void PostRestoreCommand(void);
  29. extern bool IsPromoteSignaled(void);
  30. extern void ResetPromoteSignaled(void);
  31. extern void enable_startup_progress_timeout(void);
  32. extern void disable_startup_progress_timeout(void);
  33. extern void begin_startup_progress_phase(void);
  34. extern void startup_progress_timeout_handler(void);
  35. extern bool has_startup_progress_timeout_expired(long *secs, int *usecs);
  36. #endif /* _STARTUP_H */