aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginxlog.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2012-11-28 12:35:01 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2012-11-28 13:01:15 -0300
commit1577b46b7c81e490cf5c8f0e90d0e5d0c09b5414 (patch)
tree6b7b73eea52d8beb905c8c4b592235cba4c41565 /src/backend/access/gin/ginxlog.c
parentdd7353dde82ad451bf681b37175be128995330fe (diff)
downloadpostgresql-1577b46b7c81e490cf5c8f0e90d0e5d0c09b5414.tar.gz
postgresql-1577b46b7c81e490cf5c8f0e90d0e5d0c09b5414.zip
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/gin/ginxlog.c')
-rw-r--r--src/backend/access/gin/ginxlog.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/backend/access/gin/ginxlog.c b/src/backend/access/gin/ginxlog.c
index 4536c9c63dc..0ff66c875bc 100644
--- a/src/backend/access/gin/ginxlog.c
+++ b/src/backend/access/gin/ginxlog.c
@@ -766,69 +766,6 @@ gin_redo(XLogRecPtr lsn, XLogRecord *record)
MemoryContextReset(opCtx);
}
-static void
-desc_node(StringInfo buf, RelFileNode node, BlockNumber blkno)
-{
- appendStringInfo(buf, "node: %u/%u/%u blkno: %u",
- node.spcNode, node.dbNode, node.relNode, blkno);
-}
-
-void
-gin_desc(StringInfo buf, uint8 xl_info, char *rec)
-{
- uint8 info = xl_info & ~XLR_INFO_MASK;
-
- switch (info)
- {
- case XLOG_GIN_CREATE_INDEX:
- appendStringInfo(buf, "Create index, ");
- desc_node(buf, *(RelFileNode *) rec, GIN_ROOT_BLKNO);
- break;
- case XLOG_GIN_CREATE_PTREE:
- appendStringInfo(buf, "Create posting tree, ");
- desc_node(buf, ((ginxlogCreatePostingTree *) rec)->node, ((ginxlogCreatePostingTree *) rec)->blkno);
- break;
- case XLOG_GIN_INSERT:
- appendStringInfo(buf, "Insert item, ");
- desc_node(buf, ((ginxlogInsert *) rec)->node, ((ginxlogInsert *) rec)->blkno);
- appendStringInfo(buf, " offset: %u nitem: %u isdata: %c isleaf %c isdelete %c updateBlkno:%u",
- ((ginxlogInsert *) rec)->offset,
- ((ginxlogInsert *) rec)->nitem,
- (((ginxlogInsert *) rec)->isData) ? 'T' : 'F',
- (((ginxlogInsert *) rec)->isLeaf) ? 'T' : 'F',
- (((ginxlogInsert *) rec)->isDelete) ? 'T' : 'F',
- ((ginxlogInsert *) rec)->updateBlkno);
- break;
- case XLOG_GIN_SPLIT:
- appendStringInfo(buf, "Page split, ");
- desc_node(buf, ((ginxlogSplit *) rec)->node, ((ginxlogSplit *) rec)->lblkno);
- appendStringInfo(buf, " isrootsplit: %c", (((ginxlogSplit *) rec)->isRootSplit) ? 'T' : 'F');
- break;
- case XLOG_GIN_VACUUM_PAGE:
- appendStringInfo(buf, "Vacuum page, ");
- desc_node(buf, ((ginxlogVacuumPage *) rec)->node, ((ginxlogVacuumPage *) rec)->blkno);
- break;
- case XLOG_GIN_DELETE_PAGE:
- appendStringInfo(buf, "Delete page, ");
- desc_node(buf, ((ginxlogDeletePage *) rec)->node, ((ginxlogDeletePage *) rec)->blkno);
- break;
- case XLOG_GIN_UPDATE_META_PAGE:
- appendStringInfo(buf, "Update metapage, ");
- desc_node(buf, ((ginxlogUpdateMeta *) rec)->node, GIN_METAPAGE_BLKNO);
- break;
- case XLOG_GIN_INSERT_LISTPAGE:
- appendStringInfo(buf, "Insert new list page, ");
- desc_node(buf, ((ginxlogInsertListPage *) rec)->node, ((ginxlogInsertListPage *) rec)->blkno);
- break;
- case XLOG_GIN_DELETE_LISTPAGE:
- appendStringInfo(buf, "Delete list pages (%d), ", ((ginxlogDeleteListPages *) rec)->ndeleted);
- desc_node(buf, ((ginxlogDeleteListPages *) rec)->node, GIN_METAPAGE_BLKNO);
- break;
- default:
- elog(PANIC, "gin_desc: unknown op code %u", info);
- }
-}
-
void
gin_xlog_startup(void)
{