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

Commit77fe2b6

Browse files
committed
Fix bug in new B-tree page deletion code.
When modifying a page, must hold an exclusive lock. A shared lock isobviously not good enough.
1 parent7e30c18 commit77fe2b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ _bt_lock_branch_parent(Relation rel, BlockNumber child, BTStack stack,
996996

997997
/* Locate the parent's downlink (updating the stack entry if needed) */
998998
ItemPointerSet(&(stack->bts_btentry.t_tid),child,P_HIKEY);
999-
pbuf=_bt_getstackbuf(rel,stack,BT_READ);
999+
pbuf=_bt_getstackbuf(rel,stack,BT_WRITE);
10001000
if (pbuf==InvalidBuffer)
10011001
elog(ERROR,"failed to re-find parent key in index \"%s\" for deletion target page %u",
10021002
RelationGetRelationName(rel),child);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp