aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/rmgrdesc/gindesc.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-06-14 10:46:48 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-06-14 10:46:48 +0300
commit0ef0b6784c7d7258cae314cb46558873edaf9c0a (patch)
treeb79ffdee4813ef5db62d4aedebe8d5529270eacc /src/backend/access/rmgrdesc/gindesc.c
parentf3fdd257a430ff581090740570af9f266bb893e3 (diff)
downloadpostgresql-0ef0b6784c7d7258cae314cb46558873edaf9c0a.tar.gz
postgresql-0ef0b6784c7d7258cae314cb46558873edaf9c0a.zip
Change the signature of rm_desc so that it's passed a XLogRecord.
Just feels more natural, and is more consistent with rm_redo.
Diffstat (limited to 'src/backend/access/rmgrdesc/gindesc.c')
-rw-r--r--src/backend/access/rmgrdesc/gindesc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index cd1edfffa25..12d68d7d40a 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -77,9 +77,10 @@ desc_recompress_leaf(StringInfo buf, ginxlogRecompressDataLeaf *insertData)
}
void
-gin_desc(StringInfo buf, uint8 xl_info, char *rec)
+gin_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
switch (info)
{
@@ -121,7 +122,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
ginxlogRecompressDataLeaf *insertData =
(ginxlogRecompressDataLeaf *) payload;
- if (xl_info & XLR_BKP_BLOCK(0))
+ if (record->xl_info & XLR_BKP_BLOCK(0))
appendStringInfo(buf, " (full page image)");
else
desc_recompress_leaf(buf, insertData);
@@ -159,7 +160,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
appendStringInfoString(buf, "Vacuum data leaf page, ");
desc_node(buf, xlrec->node, xlrec->blkno);
- if (xl_info & XLR_BKP_BLOCK(0))
+ if (record->xl_info & XLR_BKP_BLOCK(0))
appendStringInfo(buf, " (full page image)");
else
desc_recompress_leaf(buf, &xlrec->data);