Fix bug in new B-tree page deletion code.
When modifying a page, must hold an exclusive lock. A shared lock is obviously not good enough.
This commit is contained in:
parent
7e30c186da
commit
77fe2b6d79
@ -996,7 +996,7 @@ _bt_lock_branch_parent(Relation rel, BlockNumber child, BTStack stack,
|
||||
|
||||
/* Locate the parent's downlink (updating the stack entry if needed) */
|
||||
ItemPointerSet(&(stack->bts_btentry.t_tid), child, P_HIKEY);
|
||||
pbuf = _bt_getstackbuf(rel, stack, BT_READ);
|
||||
pbuf = _bt_getstackbuf(rel, stack, BT_WRITE);
|
||||
if (pbuf == InvalidBuffer)
|
||||
elog(ERROR, "failed to re-find parent key in index \"%s\" for deletion target page %u",
|
||||
RelationGetRelationName(rel), child);
|
||||
|
Loading…
x
Reference in New Issue
Block a user