LCOV - differential code coverage report
Current view: top level - src/include/access - rmgr.h (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 4 4 4
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 2 2 2
Baseline: 16@8cea358b128 Branches: 75.0 % 4 3 1 3
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 100.0 % 4 4 4
Function coverage date bins:
(240..) days: 100.0 % 2 2 2
Branch coverage date bins:
(240..) days: 75.0 % 4 3 1 3

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * rmgr.h
                                  3                 :                :  *
                                  4                 :                :  * Resource managers definition
                                  5                 :                :  *
                                  6                 :                :  * src/include/access/rmgr.h
                                  7                 :                :  */
                                  8                 :                : #ifndef RMGR_H
                                  9                 :                : #define RMGR_H
                                 10                 :                : 
                                 11                 :                : typedef uint8 RmgrId;
                                 12                 :                : 
                                 13                 :                : /*
                                 14                 :                :  * Built-in resource managers
                                 15                 :                :  *
                                 16                 :                :  * The actual numerical values for each rmgr ID are defined by the order
                                 17                 :                :  * of entries in rmgrlist.h.
                                 18                 :                :  *
                                 19                 :                :  * Note: RM_MAX_ID must fit in RmgrId; widening that type will affect the XLOG
                                 20                 :                :  * file format.
                                 21                 :                :  */
                                 22                 :                : #define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup,mask,decode) \
                                 23                 :                :     symname,
                                 24                 :                : 
                                 25                 :                : typedef enum RmgrIds
                                 26                 :                : {
                                 27                 :                : #include "access/rmgrlist.h"
                                 28                 :                :     RM_NEXT_ID
                                 29                 :                : }           RmgrIds;
                                 30                 :                : 
                                 31                 :                : #undef PG_RMGR
                                 32                 :                : 
                                 33                 :                : #define RM_MAX_ID           UINT8_MAX
                                 34                 :                : #define RM_MAX_BUILTIN_ID   (RM_NEXT_ID - 1)
                                 35                 :                : #define RM_MIN_CUSTOM_ID    128
                                 36                 :                : #define RM_MAX_CUSTOM_ID    UINT8_MAX
                                 37                 :                : #define RM_N_IDS            (UINT8_MAX + 1)
                                 38                 :                : #define RM_N_BUILTIN_IDS    (RM_MAX_BUILTIN_ID + 1)
                                 39                 :                : #define RM_N_CUSTOM_IDS     (RM_MAX_CUSTOM_ID - RM_MIN_CUSTOM_ID + 1)
                                 40                 :                : 
                                 41                 :                : static inline bool
  738 jdavis@postgresql.or       42                 :CBC     6610120 : RmgrIdIsBuiltin(int rmid)
                                 43                 :                : {
                                 44                 :        6610120 :     return rmid <= RM_MAX_BUILTIN_ID;
                                 45                 :                : }
                                 46                 :                : 
                                 47                 :                : static inline bool
                                 48                 :           2748 : RmgrIdIsCustom(int rmid)
                                 49                 :                : {
                                 50   [ +  +  +  - ]:           2748 :     return rmid >= RM_MIN_CUSTOM_ID && rmid <= RM_MAX_CUSTOM_ID;
                                 51                 :                : }
                                 52                 :                : 
                                 53                 :                : #define RmgrIdIsValid(rmid) (RmgrIdIsBuiltin((rmid)) || RmgrIdIsCustom((rmid)))
                                 54                 :                : 
                                 55                 :                : /*
                                 56                 :                :  * RmgrId to use for extensions that require an RmgrId, but are still in
                                 57                 :                :  * development and have not reserved their own unique RmgrId yet. See:
                                 58                 :                :  * https://wiki.postgresql.org/wiki/CustomWALResourceManagers
                                 59                 :                :  */
                                 60                 :                : #define RM_EXPERIMENTAL_ID      128
                                 61                 :                : 
                                 62                 :                : #endif                          /* RMGR_H */
        

Generated by: LCOV version 2.1-beta2-3-g6141622