4 * Resource managers definition
6 * src/include/access/rmgr.h
14 * Built-in resource managers
16 * The actual numerical values for each rmgr ID are defined by the order
17 * of entries in rmgrlist.h.
19 * Note: RM_MAX_ID must fit in RmgrId; widening that type will affect the XLOG
22 #define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup,mask,decode) \
27 #include "access/rmgrlist.h"
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)
42 RmgrIdIsBuiltin(int rmid
)
44 return rmid
<= RM_MAX_BUILTIN_ID
;
48 RmgrIdIsCustom(int rmid
)
50 return rmid
>= RM_MIN_CUSTOM_ID
&& rmid
<= RM_MAX_CUSTOM_ID
;
53 #define RmgrIdIsValid(rmid) (RmgrIdIsBuiltin((rmid)) || RmgrIdIsCustom((rmid)))
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
60 #define RM_EXPERIMENTAL_ID 128