Revert "Commit pages with tuple"

This reverts commit 94eeb83abe.
This commit is contained in:
Andrew Kane
2022-07-31 21:36:46 -07:00
parent 94eeb83abe
commit 92a671eeb1

View File

@@ -60,7 +60,6 @@ static void
InsertTuple(Relation rel, IndexTuple itup, Relation heapRel, Datum *values)
{
Buffer buf;
Buffer prevbuf = InvalidBuffer;
Page page;
GenericXLogState *state;
Size itemsz;
@@ -106,18 +105,20 @@ InsertTuple(Relation rel, IndexTuple itup, Relation heapRel, Datum *values)
/* Update previous buffer */
IvfflatPageGetOpaque(page)->nextblkno = insertPage;
MarkBufferDirty(buf);
/* Init page */
PageInit(newpage, BufferGetPageSize(newbuf), sizeof(IvfflatPageOpaqueData));
IvfflatPageGetOpaque(newpage)->nextblkno = InvalidBlockNumber;
IvfflatPageGetOpaque(newpage)->page_id = IVFFLAT_PAGE_ID;
prevbuf = buf;
buf = newbuf;
page = newpage;
/* Commit */
MarkBufferDirty(buf);
MarkBufferDirty(newbuf);
GenericXLogFinish(state);
break;
/* Unlock */
UnlockReleaseBuffer(buf);
UnlockReleaseBuffer(newbuf);
}
}
@@ -127,9 +128,6 @@ InsertTuple(Relation rel, IndexTuple itup, Relation heapRel, Datum *values)
IvfflatCommitBuffer(buf, state);
if (BufferIsValid(prevbuf))
UnlockReleaseBuffer(prevbuf);
/* Update the insert page */
if (insertPage != originalInsertPage)
IvfflatUpdateList(rel, state, listInfo, insertPage, originalInsertPage, InvalidBlockNumber, MAIN_FORKNUM);