gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1KB

  1. /*
  2. * AM-callable functions for BRIN indexes
  3. *
  4. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  5. * Portions Copyright (c) 1994, Regents of the University of California
  6. *
  7. * IDENTIFICATION
  8. * src/include/access/brin.h
  9. */
  10. #ifndef BRIN_H
  11. #define BRIN_H
  12. #include "fmgr.h"
  13. #include "nodes/execnodes.h"
  14. #include "utils/relcache.h"
  15. /*
  16. * Storage type for BRIN's reloptions
  17. */
  18. typedef struct BrinOptions
  19. {
  20. int32 vl_len_; /* varlena header (do not touch directly!) */
  21. BlockNumber pagesPerRange;
  22. bool autosummarize;
  23. } BrinOptions;
  24. /*
  25. * BrinStatsData represents stats data for planner use
  26. */
  27. typedef struct BrinStatsData
  28. {
  29. BlockNumber pagesPerRange;
  30. BlockNumber revmapNumPages;
  31. } BrinStatsData;
  32. #define BRIN_DEFAULT_PAGES_PER_RANGE 128
  33. #define BrinGetPagesPerRange(relation) \
  34. ((relation)->rd_options ? \
  35. ((BrinOptions *) (relation)->rd_options)->pagesPerRange : \
  36. BRIN_DEFAULT_PAGES_PER_RANGE)
  37. #define BrinGetAutoSummarize(relation) \
  38. ((relation)->rd_options ? \
  39. ((BrinOptions *) (relation)->rd_options)->autosummarize : \
  40. false)
  41. extern void brinGetStats(Relation index, BrinStatsData *stats);
  42. #endif /* BRIN_H */
上海开阖软件有限公司 沪ICP备12045867号-1