diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-05 17:21:29 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-06 08:47:28 -0300 |
commit | 5a1cd89f8f4a0bc13c85810de47d48bb6386ea89 (patch) | |
tree | cc6aaa1c924658847fcc1a143bdcebad18dbfa08 /src/include/access/rmgr.h | |
parent | cb9b66d31ad4bcd37226f20d651a213323621b89 (diff) |
Split out list of XLog resource managers
The new rmgrlist.h header, containing all necessary data
about built-in resource managers, allows other pieces of code to
access them.
In particular, this allows a future pg_xlogdump program to extract
rm_desc function pointers, without having to keep a duplicate list of
them.
Diffstat (limited to 'src/include/access/rmgr.h')
-rw-r--r-- | src/include/access/rmgr.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/include/access/rmgr.h b/src/include/access/rmgr.h index e4844fe96c9..f6d27765b25 100644 --- a/src/include/access/rmgr.h +++ b/src/include/access/rmgr.h @@ -13,27 +13,23 @@ typedef uint8 RmgrId; /* * Built-in resource managers * - * Note: RM_MAX_ID could be as much as 255 without breaking the XLOG file - * format, but we keep it small to minimize the size of RmgrTable[]. + * The actual numerical values for each rmgr ID are defined by the order + * of entries in rmgrlist.h. + * + * Note: RM_MAX_ID must fit in RmgrId; widening that type will affect the XLOG + * file format. */ -#define RM_XLOG_ID 0 -#define RM_XACT_ID 1 -#define RM_SMGR_ID 2 -#define RM_CLOG_ID 3 -#define RM_DBASE_ID 4 -#define RM_TBLSPC_ID 5 -#define RM_MULTIXACT_ID 6 -#define RM_RELMAP_ID 7 -#define RM_STANDBY_ID 8 -#define RM_HEAP2_ID 9 -#define RM_HEAP_ID 10 -#define RM_BTREE_ID 11 -#define RM_HASH_ID 12 -#define RM_GIN_ID 13 -#define RM_GIST_ID 14 -#define RM_SEQ_ID 15 -#define RM_SPGIST_ID 16 +#define PG_RMGR(symname,name,redo,desc,startup,cleanup,restartpoint) \ + symname, + +typedef enum RmgrIds +{ +#include "access/rmgrlist.h" + RM_NEXT_ID +} RmgrIds; + +#undef PG_RMGR -#define RM_MAX_ID RM_SPGIST_ID +#define RM_MAX_ID (RM_NEXT_ID - 1) #endif /* RMGR_H */ |