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

Commite87b00b

Browse files
Fix nbtree page split rmgr desc routine.
Include newitemoff in rmgr desc output for nbtree page split records.In passing, correct an obsolete comment that claimed that newitemoff isonly logged for _L variant nbtree page split WAL records.Both issues were oversights in commit2c03216, which revamped theWAL format.Author: Peter GeogheganBackpatch: 9.5-, where the WAL format was revamped.
1 parent64d926f commite87b00b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎src/backend/access/rmgrdesc/nbtdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ btree_desc(StringInfo buf, XLogReaderState *record)
4040
{
4141
xl_btree_split*xlrec= (xl_btree_split*)rec;
4242

43-
appendStringInfo(buf,"level %u, firstright %d",
44-
xlrec->level,xlrec->firstright);
43+
appendStringInfo(buf,"level %u, firstright %d, newitemoff %d",
44+
xlrec->level,xlrec->firstright,xlrec->newitemoff);
4545
break;
4646
}
4747
caseXLOG_BTREE_VACUUM:

‎src/include/access/nbtxlog.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ typedef struct xl_btree_insert
8282
*
8383
* Note: the four XLOG_BTREE_SPLIT xl_info codes all use this data record.
8484
* The _L and _R variants indicate whether the inserted tuple went into the
85-
* left or right split page (and thus, whethernewitemoff andthe new item
86-
*are stored or not).The _HIGHKEY variants indicate that we've logged
87-
*explicitly left page highkey value, otherwise redo should use right page
88-
*leftmost key as a left pagehigh key. _HIGHKEY is specified for internal
89-
*pages where right pageleftmost key is suppressed, and for leaf pages
90-
*of covering indexes wherehigh key have non-key attributes truncated.
85+
* left or right split page (and thus, whether the new item is stored or not).
86+
* The _HIGHKEY variants indicate that we've logged explicitly left page high
87+
* key value, otherwise redo should use right page leftmost key as a left page
88+
* high key. _HIGHKEY is specified for internal pages where right page
89+
* leftmost key is suppressed, and for leaf pages of covering indexes where
90+
* high key have non-key attributes truncated.
9191
*
9292
* Backup Blk 0: original page / new left page
9393
*
@@ -109,7 +109,7 @@ typedef struct xl_btree_split
109109
{
110110
uint32level;/* tree level of page being split */
111111
OffsetNumberfirstright;/* first item moved to right page */
112-
OffsetNumbernewitemoff;/* new item's offset (if placed on left page) */
112+
OffsetNumbernewitemoff;/* new item's offset (useful for _L variant) */
113113
}xl_btree_split;
114114

115115
#defineSizeOfBtreeSplit(offsetof(xl_btree_split, newitemoff) + sizeof(OffsetNumber))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp