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

Commit0ab4db5

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 parent17b985b commit0ab4db5

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
@@ -748,9 +748,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
748748
(((ginxlogInsert*)rec)->isData) ?'T' :'F',
749749
(((ginxlogInsert*)rec)->isLeaf) ?'T' :'F',
750750
(((ginxlogInsert*)rec)->isDelete) ?'T' :'F',
751-
((ginxlogInsert*)rec)->updateBlkno
752-
);
753-
751+
((ginxlogInsert*)rec)->updateBlkno);
754752
break;
755753
caseXLOG_GIN_SPLIT:
756754
appendStringInfo(buf,"Page split, ");
@@ -767,15 +765,15 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
767765
break;
768766
caseXLOG_GIN_UPDATE_META_PAGE:
769767
appendStringInfo(buf,"Update metapage, ");
770-
desc_node(buf, ((ginxlogUpdateMeta*)rec)->node,((ginxlogUpdateMeta*)rec)->metadata.tail);
768+
desc_node(buf, ((ginxlogUpdateMeta*)rec)->node,GIN_METAPAGE_BLKNO);
771769
break;
772770
caseXLOG_GIN_INSERT_LISTPAGE:
773771
appendStringInfo(buf,"Insert new list page, ");
774772
desc_node(buf, ((ginxlogInsertListPage*)rec)->node, ((ginxlogInsertListPage*)rec)->blkno);
775773
break;
776774
caseXLOG_GIN_DELETE_LISTPAGE:
777775
appendStringInfo(buf,"Delete list pages (%d), ", ((ginxlogDeleteListPages*)rec)->ndeleted);
778-
desc_node(buf, ((ginxlogDeleteListPages*)rec)->node,((ginxlogDeleteListPages*)rec)->metadata.head);
776+
desc_node(buf, ((ginxlogDeleteListPages*)rec)->node,GIN_METAPAGE_BLKNO);
779777
break;
780778
default:
781779
elog(PANIC,"gin_desc: unknown op code %u",info);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp