Insert before unlocking new buffer

This commit is contained in:
Andrew Kane
2022-12-23 20:08:32 -08:00
parent aa62b42a9a
commit b400ac0f36

View File

@@ -130,9 +130,14 @@ InsertTuple(Relation rel, IndexTuple itup, Relation heapRel, Datum *values)
/* Unlock extend relation lock as early as possible */
UnlockReleaseBuffer(metabuf);
/* Unlock rest */
UnlockReleaseBuffer(newbuf);
/* Unlock previous buffer */
UnlockReleaseBuffer(buf);
/* Prepare new buffer */
state = GenericXLogStart(rel);
buf = newbuf;
page = GenericXLogRegisterBuffer(state, buf, 0);
break;
}
}