summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-04-06 18:10:35 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-04-06 18:10:35 -0400
commit13847713e275baa047e62f00150bc3a814fc68d2 (patch)
treed32831c9f41dd3067a7ada01fb0caaac988d72f9 /src
parent9b4d973af090694d3128a51b709c61f5a1ecc80f (diff)
Fix misleading output from gin_desc().
XLOG_GIN_UPDATE_META_PAGE and XLOG_GIN_DELETE_LISTPAGE records were printed with a list link field labeled as "blkno", which was confusing, especially when the link was empty (InvalidBlockNumber). Print the metapage block number instead, since that's what's actually being updated. We could include the link values too as a separate field, but not clear it's worth the trouble. Back-patch to 8.4 where the dubious code was added.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/gin/ginxlog.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/access/gin/ginxlog.c b/src/backend/access/gin/ginxlog.c
index 327d7c009d6..f2d82810f3e 100644
--- a/src/backend/access/gin/ginxlog.c
+++ b/src/backend/access/gin/ginxlog.c
@@ -747,9 +747,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
(((ginxlogInsert *) rec)->isData) ? 'T' : 'F',
(((ginxlogInsert *) rec)->isLeaf) ? 'T' : 'F',
(((ginxlogInsert *) rec)->isDelete) ? 'T' : 'F',
- ((ginxlogInsert *) rec)->updateBlkno
- );
-
+ ((ginxlogInsert *) rec)->updateBlkno);
break;
case XLOG_GIN_SPLIT:
appendStringInfo(buf, "Page split, ");
@@ -766,7 +764,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
break;
case XLOG_GIN_UPDATE_META_PAGE:
appendStringInfo(buf, "Update metapage, ");
- desc_node(buf, ((ginxlogUpdateMeta *) rec)->node, ((ginxlogUpdateMeta *) rec)->metadata.tail);
+ desc_node(buf, ((ginxlogUpdateMeta *) rec)->node, GIN_METAPAGE_BLKNO);
break;
case XLOG_GIN_INSERT_LISTPAGE:
appendStringInfo(buf, "Insert new list page, ");
@@ -774,7 +772,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
break;
case XLOG_GIN_DELETE_LISTPAGE:
appendStringInfo(buf, "Delete list pages (%d), ", ((ginxlogDeleteListPages *) rec)->ndeleted);
- desc_node(buf, ((ginxlogDeleteListPages *) rec)->node, ((ginxlogDeleteListPages *) rec)->metadata.head);
+ desc_node(buf, ((ginxlogDeleteListPages *) rec)->node, GIN_METAPAGE_BLKNO);
break;
default:
elog(PANIC, "gin_desc: unknown op code %u", info);