progress.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*-------------------------------------------------------------------------
  2. *
  3. * progress.h
  4. * Constants used with the progress reporting facilities defined in
  5. * pgstat.h. These are possibly interesting to extensions, so we
  6. * expose them via this header file. Note that if you update these
  7. * constants, you probably also need to update the views based on them
  8. * in system_views.sql.
  9. *
  10. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  11. * Portions Copyright (c) 1994, Regents of the University of California
  12. *
  13. * src/include/commands/progress.h
  14. *
  15. *-------------------------------------------------------------------------
  16. */
  17. #ifndef PROGRESS_H
  18. #define PROGRESS_H
  19. /* Progress parameters for (lazy) vacuum */
  20. #define PROGRESS_VACUUM_PHASE 0
  21. #define PROGRESS_VACUUM_TOTAL_HEAP_BLKS 1
  22. #define PROGRESS_VACUUM_HEAP_BLKS_SCANNED 2
  23. #define PROGRESS_VACUUM_HEAP_BLKS_VACUUMED 3
  24. #define PROGRESS_VACUUM_NUM_INDEX_VACUUMS 4
  25. #define PROGRESS_VACUUM_MAX_DEAD_TUPLES 5
  26. #define PROGRESS_VACUUM_NUM_DEAD_TUPLES 6
  27. /* Phases of vacuum (as advertised via PROGRESS_VACUUM_PHASE) */
  28. #define PROGRESS_VACUUM_PHASE_SCAN_HEAP 1
  29. #define PROGRESS_VACUUM_PHASE_VACUUM_INDEX 2
  30. #define PROGRESS_VACUUM_PHASE_VACUUM_HEAP 3
  31. #define PROGRESS_VACUUM_PHASE_INDEX_CLEANUP 4
  32. #define PROGRESS_VACUUM_PHASE_TRUNCATE 5
  33. #define PROGRESS_VACUUM_PHASE_FINAL_CLEANUP 6
  34. #endif