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

Commit09b236a

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 parentb54cff2 commit09b236a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ typedef struct xl_btree_insert
7878
*
7979
* Note: the four XLOG_BTREE_SPLIT xl_info codes all use this data record.
8080
* The _L and _R variants indicate whether the inserted tuple went into the
81-
* left or right split page (and thus, whethernewitemoff andthe new item
82-
*are stored or not).The _ROOT variants indicate that we are splitting
83-
*the root page, and thusthat a newroot record rather than an insert or
84-
*split record should follow.Note that a split record never carries a
85-
*metapage update --- we'll do thatin the parent-level update.
81+
* left or right split page (and thus, whether the new item is stored or not).
82+
* The _ROOT variants indicate that we are splitting the root page, and thus
83+
* that a newroot record rather than an insert or split record should follow.
84+
* Note that a split record never carries a metapage update --- we'll do that
85+
* in the parent-level update.
8686
*
8787
* Backup Blk 0: original page / new left page
8888
*
@@ -104,7 +104,7 @@ typedef struct xl_btree_split
104104
{
105105
uint32level;/* tree level of page being split */
106106
OffsetNumberfirstright;/* first item moved to right page */
107-
OffsetNumbernewitemoff;/* new item's offset (if placed on left page) */
107+
OffsetNumbernewitemoff;/* new item's offset (useful for _L variants) */
108108
}xl_btree_split;
109109

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp