* _bitmap_log_bitmap_lastwords() -- log the last two words in a bitmap. */
| 948 | * _bitmap_log_bitmap_lastwords() -- log the last two words in a bitmap. |
| 949 | */ |
| 950 | void |
| 951 | _bitmap_log_bitmap_lastwords(Relation rel, Buffer lovBuffer, |
| 952 | OffsetNumber lovOffset, BMLOVItem lovItem) |
| 953 | { |
| 954 | xl_bm_bitmap_lastwords xlLastwords; |
| 955 | XLogRecPtr recptr; |
| 956 | |
| 957 | xlLastwords.bm_node = rel->rd_node; |
| 958 | xlLastwords.bm_last_compword = lovItem->bm_last_compword; |
| 959 | xlLastwords.bm_last_word = lovItem->bm_last_word; |
| 960 | xlLastwords.lov_words_header = lovItem->lov_words_header; |
| 961 | xlLastwords.bm_last_setbit = lovItem->bm_last_setbit; |
| 962 | xlLastwords.bm_last_tid_location = lovItem->bm_last_tid_location; |
| 963 | xlLastwords.bm_lov_blkno = BufferGetBlockNumber(lovBuffer); |
| 964 | xlLastwords.bm_lov_offset = lovOffset; |
| 965 | |
| 966 | XLogBeginInsert(); |
| 967 | XLogRegisterData((char*)&xlLastwords, sizeof(xl_bm_bitmap_lastwords)); |
| 968 | XLogRegisterBuffer(0, lovBuffer, REGBUF_STANDARD); |
| 969 | |
| 970 | recptr = XLogInsert(RM_BITMAP_ID, XLOG_BITMAP_INSERT_BITMAP_LASTWORDS); |
| 971 | |
| 972 | PageSetLSN(BufferGetPage(lovBuffer), recptr); |
| 973 | |
| 974 | /* |
| 975 | * WAL consistency checking |
| 976 | */ |
| 977 | #ifdef DUMP_BITMAPAM_INSERT_RECORDS |
| 978 | _dump_page("insert", XactLastRecEnd, &rel->rd_node, lovBuffer); |
| 979 | #endif |
| 980 | } |
| 981 | |
| 982 | /* |
| 983 | * _bitmap_log_lovitem() -- log adding a new lov item to a lov page. |
no test coverage detected