Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1384771

Browse files
committed
Fix misleading output from gin_desc().
XLOG_GIN_UPDATE_META_PAGE and XLOG_GIN_DELETE_LISTPAGE records were printedwith a list link field labeled as "blkno", which was confusing, especiallywhen the link was empty (InvalidBlockNumber). Print the metapage blocknumber instead, since that's what's actually being updated. We couldinclude the link values too as a separate field, but not clear it's worththe trouble.Back-patch to 8.4 where the dubious code was added.
1 parent9b4d973 commit1384771

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/backend/access/gin/ginxlog.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
747747
(((ginxlogInsert*)rec)->isData) ?'T' :'F',
748748
(((ginxlogInsert*)rec)->isLeaf) ?'T' :'F',
749749
(((ginxlogInsert*)rec)->isDelete) ?'T' :'F',
750-
((ginxlogInsert*)rec)->updateBlkno
751-
);
752-
750+
((ginxlogInsert*)rec)->updateBlkno);
753751
break;
754752
caseXLOG_GIN_SPLIT:
755753
appendStringInfo(buf,"Page split, ");
@@ -766,15 +764,15 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
766764
break;
767765
caseXLOG_GIN_UPDATE_META_PAGE:
768766
appendStringInfo(buf,"Update metapage, ");
769-
desc_node(buf, ((ginxlogUpdateMeta*)rec)->node,((ginxlogUpdateMeta*)rec)->metadata.tail);
767+
desc_node(buf, ((ginxlogUpdateMeta*)rec)->node,GIN_METAPAGE_BLKNO);
770768
break;
771769
caseXLOG_GIN_INSERT_LISTPAGE:
772770
appendStringInfo(buf,"Insert new list page, ");
773771
desc_node(buf, ((ginxlogInsertListPage*)rec)->node, ((ginxlogInsertListPage*)rec)->blkno);
774772
break;
775773
caseXLOG_GIN_DELETE_LISTPAGE:
776774
appendStringInfo(buf,"Delete list pages (%d), ", ((ginxlogDeleteListPages*)rec)->ndeleted);
777-
desc_node(buf, ((ginxlogDeleteListPages*)rec)->node,((ginxlogDeleteListPages*)rec)->metadata.head);
775+
desc_node(buf, ((ginxlogDeleteListPages*)rec)->node,GIN_METAPAGE_BLKNO);
778776
break;
779777
default:
780778
elog(PANIC,"gin_desc: unknown op code %u",info);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp