MCPcopy Create free account
hub / github.com/apache/cloudberry / ginRedoInsertData

Function ginRedoInsertData

src/backend/access/gin/ginxlog.c:318–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static void
319ginRedoInsertData(Buffer buffer, bool isLeaf, BlockNumber rightblkno, void *rdata)
320{
321 Page page = BufferGetPage(buffer);
322
323 if (isLeaf)
324 {
325 ginxlogRecompressDataLeaf *data = (ginxlogRecompressDataLeaf *) rdata;
326
327 Assert(GinPageIsLeaf(page));
328
329 ginRedoRecompress(page, data);
330 }
331 else
332 {
333 ginxlogInsertDataInternal *data = (ginxlogInsertDataInternal *) rdata;
334 PostingItem *oldpitem;
335
336 Assert(!GinPageIsLeaf(page));
337
338 /* update link to right page after split */
339 oldpitem = GinDataPageGetPostingItem(page, data->offset);
340 PostingItemSetBlockNumber(oldpitem, rightblkno);
341
342 GinDataPageAddPostingItem(page, &data->newitem, data->offset);
343 }
344}
345
346static void
347ginRedoInsert(XLogReaderState *record)

Callers 1

ginRedoInsertFunction · 0.85

Calls 2

ginRedoRecompressFunction · 0.85

Tested by

no test coverage detected