diff options
author | Alvaro Herrera | 2012-11-28 15:35:01 +0000 |
---|---|---|
committer | Alvaro Herrera | 2012-11-28 16:01:15 +0000 |
commit | 1577b46b7c81e490cf5c8f0e90d0e5d0c09b5414 (patch) | |
tree | 6b7b73eea52d8beb905c8c4b592235cba4c41565 /src/backend/access/rmgrdesc/relmapdesc.c | |
parent | dd7353dde82ad451bf681b37175be128995330fe (diff) |
Split out rmgr rm_desc functions into their own files
This is necessary (but not sufficient) to have them compilable outside
of a backend environment.
Diffstat (limited to 'src/backend/access/rmgrdesc/relmapdesc.c')
-rw-r--r-- | src/backend/access/rmgrdesc/relmapdesc.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/backend/access/rmgrdesc/relmapdesc.c b/src/backend/access/rmgrdesc/relmapdesc.c new file mode 100644 index 00000000000..3eaf6be9b41 --- /dev/null +++ b/src/backend/access/rmgrdesc/relmapdesc.c @@ -0,0 +1,33 @@ +/*------------------------------------------------------------------------- + * + * relmapdesc.c + * rmgr descriptor routines for utils/cache/relmapper.c + * + * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * + * IDENTIFICATION + * src/backend/access/rmgrdesc/relmapdesc.c + * + *------------------------------------------------------------------------- + */ +#include "postgres.h" + +#include "utils/relmapper.h" + +void +relmap_desc(StringInfo buf, uint8 xl_info, char *rec) +{ + uint8 info = xl_info & ~XLR_INFO_MASK; + + if (info == XLOG_RELMAP_UPDATE) + { + xl_relmap_update *xlrec = (xl_relmap_update *) rec; + + appendStringInfo(buf, "update relmap: database %u tablespace %u size %u", + xlrec->dbid, xlrec->tsid, xlrec->nbytes); + } + else + appendStringInfo(buf, "UNKNOWN"); +} |