您好,登錄后才能下訂單哦!
heap_insert xl_heap_insert xlrec; xl_heap_header xlhdr; XLogRegisterData((char *) &xlrec, SizeOfHeapInsert);->//xl_heap_insert |-- XLogRecData *rdata; | rdata->data = data; | rdata->len = len; | mainrdata_last->next = rdata; | mainrdata_last = rdata; |-- mainrdata_len += len; //xl_heap_header+heapup->t_data XLogRegisterBufData(0, (char *) &xlhdr, SizeOfHeapHeader);-> |-- regbuf = ®istered_buffers[block_id]; | rdata->data = data; | rdata->len = len; | regbuf->rdata_tail->next = rdata; | regbuf->rdata_tail = rdata; |-- regbuf->rdata_len += len; XLogRegisterBufData(0,(char *) heaptup->t_data + SizeofHeapTupleHeader,heaptup->t_len - SizeofHeapTupleHeader); recptr = XLogInsert(RM_HEAP_ID, info);-> |-- rdt = XLogRecordAssemble(rmid, info, RedoRecPtr, doPageWrites,&fpw_lsn); |-- EndPos = XLogInsertRecord(rdt, fpw_lsn, curinsert_flags); static XLogRecData hdr_rdt; XLogRecordAssemble: char *scratch = hdr_scratch;//hdr_scratch是一個xlog記錄的開始位置 rechdr = (XLogRecord *) scratch; scratch += SizeOfXLogRecord; hdr_rdt.next = NULL; rdt_datas_last = &hdr_rdt;//xlog記錄鏈表頭 hdr_rdt.data = hdr_scratch; //hdr_rdt->next=xl_heap_header+heapup->t_data registered_buffer *regbuf = ®istered_buffers[block_id]; rdt_datas_last->next = regbuf->rdata_head; dt_datas_last = regbuf->rdata_tail; //xl_heap_header+heapup->t_data后面緊跟著xl_heap_insert rdt_datas_last->next = mainrdata_head; rdt_datas_last = mainrdata_last;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。