1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-18 12:22:09 +03:00

Change the signature of rm_desc so that it's passed a XLogRecord.

Just feels more natural, and is more consistent with rm_redo.
This commit is contained in:
Heikki Linnakangas
2014-06-14 10:46:48 +03:00
parent f3fdd257a4
commit 0ef0b6784c
37 changed files with 82 additions and 69 deletions

View File

@@ -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);