diff --git a/src/ivfinsert.c b/src/ivfinsert.c index 198b7d6..7394bc0 100644 --- a/src/ivfinsert.c +++ b/src/ivfinsert.c @@ -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; } }