diff --git a/src/communication/network_interface_sr.c b/src/communication/network_interface_sr.c index 026aae8082b..e9c1df5a6f7 100644 --- a/src/communication/network_interface_sr.c +++ b/src/communication/network_interface_sr.c @@ -5392,7 +5392,7 @@ sqmgr_execute_query (THREAD_ENTRY * thread_p, unsigned int rid, char *request, i } memcpy (aligned_page_buf, page_ptr, page_size); - qmgr_free_old_page_and_init (thread_p, page_ptr, list_id->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_ptr); page_ptr = aligned_page_buf; /* for now, allow end query if there is only one page and more ... */ @@ -5907,7 +5907,7 @@ sqmgr_prepare_and_execute_query (THREAD_ENTRY * thread_p, unsigned int rid, char /* to free page_ptr early */ memcpy (aligned_page_buf, page_ptr, page_size); - qmgr_free_old_page_and_init (thread_p, page_ptr, q_result->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_ptr); } else { diff --git a/src/query/list_file.c b/src/query/list_file.c index afb1ebcd3f7..70631251cc5 100644 --- a/src/query/list_file.c +++ b/src/query/list_file.c @@ -200,11 +200,8 @@ static int qfile_Max_tuple_page_size; static int qfile_get_sort_list_size (SORT_LIST * sort_list); static int qfile_compare_tuple_values (QFILE_TUPLE tplp1, QFILE_TUPLE tplp2, TP_DOMAIN * domain, int *cmp); -static void qfile_set_dirty_page_and_skip_logging (THREAD_ENTRY * thread_p, PAGE_PTR page_p, VFID * vfid_p, - int free_page); static bool qfile_is_first_tuple (QFILE_LIST_ID * list_id_p); static bool qfile_is_last_page_full (QFILE_LIST_ID * list_id_p, int tuple_length, const bool is_ovf_page); -static void qfile_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p, int free_page, QMGR_TEMP_FILE * vfid_p); static PAGE_PTR qfile_allocate_new_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, PAGE_PTR page_p, bool is_ovf_page); static PAGE_PTR qfile_allocate_new_ovf_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, PAGE_PTR page_p, @@ -1046,19 +1043,6 @@ qfile_print_tuple (QFILE_TUPLE_VALUE_TYPE_LIST * type_list_p, QFILE_TUPLE tuple) } #endif -static void -qfile_set_dirty_page_and_skip_logging (THREAD_ENTRY * thread_p, PAGE_PTR page_p, VFID * vfid_p, int free_page) -{ - LOG_DATA_ADDR addr; - - addr.vfid = vfid_p; - addr.pgptr = page_p; - addr.offset = -1; - log_skip_logging (thread_p, &addr); - - pgbuf_set_dirty (thread_p, page_p, free_page); -} - /* * qfile_load_xasl_node_header () - Load XASL node header from xasl stream * @@ -1290,14 +1274,10 @@ qfile_open_list (THREAD_ENTRY * thread_p, QFILE_TUPLE_VALUE_TYPE_LIST * type_lis void qfile_close_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p) { - if (list_id_p) + if (list_id_p && list_id_p->last_pgptr) { - if (list_id_p->last_pgptr != NULL) - { - QFILE_PUT_NEXT_VPID_NULL (list_id_p->last_pgptr); - - qmgr_free_old_page_and_init (thread_p, list_id_p->last_pgptr, list_id_p->tfile_vfid); - } + QFILE_PUT_NEXT_VPID_NULL (list_id_p->last_pgptr); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, list_id_p->last_pgptr); } } @@ -1388,18 +1368,6 @@ qfile_is_last_page_full (QFILE_LIST_ID * list_id_p, int tuple_length, const bool return (tuple_length + list_id_p->last_offset) > DB_PAGESIZE; } -static void -qfile_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p, int free_page, QMGR_TEMP_FILE * vfid_p) -{ - LOG_DATA_ADDR addr; - - addr.vfid = NULL; - addr.pgptr = page_p; - addr.offset = -1; - - qmgr_set_dirty_page (thread_p, page_p, free_page, &addr, vfid_p); -} - static PAGE_PTR qfile_allocate_new_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, PAGE_PTR page_p, bool is_ovf_page) { @@ -1447,7 +1415,7 @@ qfile_allocate_new_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, PAG if (page_p) { - qfile_set_dirty_page (thread_p, page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, page_p, FREE); } else { @@ -1490,7 +1458,7 @@ qfile_allocate_new_ovf_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, QFILE_PUT_OVERFLOW_VPID (prev_page_p, &new_vpid); if (prev_page_p != page_p) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } return new_page_p; @@ -1586,7 +1554,7 @@ qfile_add_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, QFI { if (prev_page_p != cur_page_p) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } return ER_FAILED; } @@ -1599,10 +1567,10 @@ qfile_add_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p, QFI if (prev_page_p != cur_page_p) { QFILE_PUT_OVERFLOW_VPID_NULL (prev_page_p); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -1819,7 +1787,7 @@ qfile_generate_tuple_into_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id qfile_add_tuple_to_list_id (list_id_p, page_p, tuple_length, tuple_length); - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -1879,7 +1847,7 @@ qfile_fast_intint_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_i /* list_id maintainance stuff */ qfile_add_tuple_to_list_id (list_id_p, page_p, tuple_length, tuple_length); - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -1967,7 +1935,7 @@ qfile_fast_intval_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_i /* list_id maintainance stuff */ qfile_add_tuple_to_list_id (list_id_p, page_p, tuple_length, tuple_length); - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -2046,7 +2014,7 @@ qfile_fast_val_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p /* list_id maintainance stuff */ qfile_add_tuple_to_list_id (list_id_p, page_p, tuple_length, tuple_length); - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -2104,7 +2072,7 @@ qfile_add_overflow_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_ { if (new_page_p) { - qfile_set_dirty_page (thread_p, new_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, new_page_p, FREE); } return ER_FAILED; } @@ -2118,76 +2086,28 @@ qfile_add_overflow_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_ { if (prev_page_p != cur_page_p) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } - qmgr_free_old_page_and_init (thread_p, ovf_page_p, input_list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, ovf_page_p); return ER_FAILED; } memcpy ((char *) new_page_p + QFILE_PAGE_HEADER_SIZE, (char *) ovf_page_p + QFILE_PAGE_HEADER_SIZE, tuple_page_size); - qmgr_free_old_page_and_init (thread_p, ovf_page_p, input_list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, ovf_page_p); prev_page_p = new_page_p; } if (prev_page_p != cur_page_p) { QFILE_PUT_OVERFLOW_VPID_NULL (prev_page_p); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); - return NO_ERROR; -} - -#if defined(ENABLE_UNUSED_FUNCTION) -/* - * qfile_get_first_page () - - * return: int (NO_ERROR or ER_FAILED) - * list_id(in): List File Identifier - */ -int -qfile_get_first_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p) -{ - PAGE_PTR new_page_p; - VPID new_vpid; - - if (list_id_p->tfile_vfid == NULL) - { - list_id_p->tfile_vfid = qmgr_create_new_temp_file (thread_p, list_id_p->query_id, TEMP_FILE_MEMBUF_NORMAL); - if (list_id_p->tfile_vfid == NULL) - { - return ER_FAILED; - } - } - - new_page_p = qmgr_get_new_page (thread_p, &new_vpid, list_id_p->tfile_vfid); - if (new_page_p == NULL) - { - return ER_FAILED; - } - - list_id_p->page_cnt++; - - QFILE_PUT_TUPLE_COUNT (new_page_p, 0); - QFILE_PUT_PREV_VPID (new_page_p, &list_id_p->last_vpid); - LS_PUT_NEXT_VPID (new_page_p); - - QFILE_COPY_VPID (&list_id_p->first_vpid, &new_vpid); - QFILE_COPY_VPID (&list_id_p->last_vpid, &new_vpid); - - list_id_p->last_pgptr = new_page_p; - list_id_p->last_offset = QFILE_PAGE_HEADER_SIZE; - QFILE_PUT_OVERFLOW_VPID_NULL (new_page_p); - - list_id_p->lasttpl_len = 0; - list_id_p->last_offset += ((0 + list_id_p->last_offset > DB_PAGESIZE) ? DB_PAGESIZE : 0); - - qfile_set_dirty_page (thread_p, new_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } -#endif /* ENABLE_UNUSED_FUNCTION */ /* * qfile_destroy_list () - @@ -2338,7 +2258,7 @@ xqfile_get_list_file_page (THREAD_ENTRY * thread_p, QUERY_ID query_id, VOLID vol } memcpy ((page_buf_p + *page_size_p), page_p, one_page_size); - qmgr_free_old_page_and_init (thread_p, page_p, tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_p); *page_size_p += DB_PAGESIZE; @@ -3430,7 +3350,7 @@ qfile_put_next_sort_item (THREAD_ENTRY * thread_p, const RECDES * recdes_p, void /* free currently fixed page */ if (sort_info_p->fixed_page != NULL) { - qmgr_free_old_page_and_init (thread_p, sort_info_p->fixed_page, list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, sort_info_p->fixed_page); } /* fix page and cache fixed vpid */ @@ -3476,7 +3396,7 @@ qfile_put_next_sort_item (THREAD_ENTRY * thread_p, const RECDES * recdes_p, void error = qfile_add_overflow_tuple_to_list (thread_p, sort_info_p->output_file, page_p, list_id_p); } #if 1 /* not SortCache */ - qmgr_free_old_page_and_init (thread_p, page_p, list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_p); #endif /* not SortCache */ } else @@ -3925,7 +3845,7 @@ qfile_clear_sort_info (SORT_INFO * sort_info_p) if (sort_info_p->fixed_page != NULL) { - qmgr_free_old_page_and_init (thread_p, sort_info_p->fixed_page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, sort_info_p->fixed_page); } #endif /* SortCache */ @@ -4128,7 +4048,7 @@ qfile_copy_list_pages (THREAD_ENTRY * thread_p, VPID * old_first_vpid_p, QMGR_TE new_page_p = qmgr_get_new_page (thread_p, new_first_vpid_p, new_tfile_vfid_p); if (new_page_p == NULL) { - qmgr_free_old_page_and_init (thread_p, old_page_p, old_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_page_p); return ER_FAILED; } @@ -4147,8 +4067,8 @@ qfile_copy_list_pages (THREAD_ENTRY * thread_p, VPID * old_first_vpid_p, QMGR_TE old_ovfl_page_p = qmgr_get_old_page (thread_p, &old_ovfl_vpid, old_tfile_vfid_p); if (old_ovfl_page_p == NULL) { - qmgr_free_old_page_and_init (thread_p, old_page_p, old_tfile_vfid_p); - qfile_set_dirty_page (thread_p, new_page_p, FREE, new_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_page_p); + qmgr_set_dirty_page (thread_p, new_page_p, FREE); return ER_FAILED; } @@ -4156,34 +4076,34 @@ qfile_copy_list_pages (THREAD_ENTRY * thread_p, VPID * old_first_vpid_p, QMGR_TE if (new_ovfl_page_p == NULL) { - qmgr_free_old_page_and_init (thread_p, old_ovfl_page_p, old_tfile_vfid_p); - qmgr_free_old_page_and_init (thread_p, old_page_p, old_tfile_vfid_p); - qfile_set_dirty_page (thread_p, new_page_p, FREE, new_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_ovfl_page_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_page_p); + qmgr_set_dirty_page (thread_p, new_page_p, FREE); return ER_FAILED; } (void) memcpy (new_ovfl_page_p, old_ovfl_page_p, DB_PAGESIZE); QFILE_GET_OVERFLOW_VPID (&old_ovfl_vpid, old_ovfl_page_p); - qmgr_free_old_page_and_init (thread_p, old_ovfl_page_p, old_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_ovfl_page_p); QFILE_PUT_OVERFLOW_VPID (prev_page_p, &new_ovfl_vpid); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); prev_page_p = new_ovfl_page_p; } if (new_ovfl_page_p) { - qfile_set_dirty_page (thread_p, new_ovfl_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, new_ovfl_page_p, FREE); } QFILE_GET_NEXT_VPID (&old_next_vpid, old_page_p); - qmgr_free_old_page_and_init (thread_p, old_page_p, old_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_page_p); if (VPID_ISNULL (&old_next_vpid)) { - qfile_set_dirty_page (thread_p, new_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, new_page_p, FREE); new_page_p = NULL; break; } @@ -4194,27 +4114,27 @@ qfile_copy_list_pages (THREAD_ENTRY * thread_p, VPID * old_first_vpid_p, QMGR_TE if (old_page_p == NULL) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); return ER_FAILED; } new_page_p = qmgr_get_new_page (thread_p, new_last_vpid_p, new_tfile_vfid_p); if (new_page_p == NULL) { - qmgr_free_old_page_and_init (thread_p, old_page_p, old_tfile_vfid_p); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, new_tfile_vfid_p); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, old_page_p); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); return ER_FAILED; } QFILE_PUT_PREV_VPID (new_page_p, &prev_vpid); QFILE_PUT_NEXT_VPID (prev_page_p, new_last_vpid_p); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } if (new_page_p) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, new_tfile_vfid_p); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } return NO_ERROR; @@ -4314,7 +4234,7 @@ qfile_get_tuple (THREAD_ENTRY * thread_p, PAGE_PTR first_page_p, QFILE_TUPLE tup if (page_p != first_page_p) { - qmgr_free_old_page_and_init (thread_p, page_p, list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_p); } if (ovfl_vpid.pageid != NULL_PAGEID) @@ -4412,7 +4332,7 @@ qfile_scan_next (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) return S_ERROR; } - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); QFILE_COPY_VPID (&scan_id_p->curr_vpid, &next_vpid); scan_id_p->curr_pgptr = next_page_p; scan_id_p->curr_tplno = 0; @@ -4427,7 +4347,7 @@ qfile_scan_next (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) if (!scan_id_p->keep_page_on_finish) { scan_id_p->curr_vpid.pageid = NULL_PAGEID; - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); } return S_END; @@ -4481,7 +4401,7 @@ qfile_scan_prev (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) return S_ERROR; } - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); QFILE_COPY_VPID (&scan_id_p->curr_vpid, &prev_vpid); scan_id_p->curr_pgptr = prev_page_p; scan_id_p->curr_tplno = QFILE_GET_TUPLE_COUNT (prev_page_p) - 1; @@ -4493,7 +4413,7 @@ qfile_scan_prev (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) { scan_id_p->position = S_BEFORE; scan_id_p->curr_vpid.pageid = NULL_PAGEID; - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); return S_END; } } @@ -4626,7 +4546,7 @@ qfile_jump_scan_tuple_position (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * sc return S_ERROR; } - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); QFILE_COPY_VPID (&scan_id_p->curr_vpid, &tuple_position_p->vpid); scan_id_p->curr_pgptr = page_p; @@ -4648,7 +4568,7 @@ qfile_jump_scan_tuple_position (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * sc { if (scan_id_p->position == S_ON) { - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); } } @@ -4812,7 +4732,7 @@ qfile_end_scan_fix (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) { if (scan_id_p->position == S_ON && scan_id_p->curr_pgptr) { - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); } else { @@ -4840,7 +4760,7 @@ qfile_close_scan (THREAD_ENTRY * thread_p, QFILE_LIST_SCAN_ID * scan_id_p) if ((scan_id_p->position == S_ON || (scan_id_p->position == S_AFTER && scan_id_p->keep_page_on_finish)) && scan_id_p->curr_pgptr) { - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); } if (scan_id_p->tplrec.tpl != NULL) @@ -6155,7 +6075,7 @@ qfile_add_tuple_get_pos_in_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_i { if (prev_page_p != cur_page_p) { - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } return ER_FAILED; } @@ -6168,10 +6088,10 @@ qfile_add_tuple_get_pos_in_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_i if (prev_page_p != cur_page_p) { QFILE_PUT_OVERFLOW_VPID_NULL (prev_page_p); - qfile_set_dirty_page (thread_p, prev_page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, prev_page_p, FREE); } - qfile_set_dirty_page (thread_p, cur_page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, cur_page_p, DONT_FREE); return NO_ERROR; } @@ -6339,7 +6259,7 @@ qfile_set_tuple_column_value (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p error = ER_FAILED; goto cleanup; } - qfile_set_dirty_page (thread_p, page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, page_p, DONT_FREE); } else { @@ -6385,7 +6305,7 @@ qfile_set_tuple_column_value (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p error = ER_FAILED; goto cleanup; } - qfile_set_dirty_page (thread_p, page_p, DONT_FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, page_p, DONT_FREE); } cleanup: @@ -6397,7 +6317,7 @@ qfile_set_tuple_column_value (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id_p /* free the page */ if (page_p != curr_page_p) { - qmgr_free_old_page_and_init (thread_p, page_p, list_id_p->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page_p); } return error; @@ -6461,7 +6381,7 @@ qfile_overwrite_tuple (THREAD_ENTRY * thread_p, PAGE_PTR first_page_p, QFILE_TUP if (page_p != first_page_p) { - qfile_set_dirty_page (thread_p, page_p, FREE, list_id_p->tfile_vfid); + qmgr_set_dirty_page (thread_p, page_p, FREE); } if (ovfl_vpid.pageid != NULL_PAGEID) diff --git a/src/query/list_file.h b/src/query/list_file.h index c7f361809d5..06ddee2cf8a 100644 --- a/src/query/list_file.h +++ b/src/query/list_file.h @@ -119,9 +119,6 @@ extern int qfile_add_tuple_get_pos_in_list (THREAD_ENTRY * thread_p, QFILE_LIST_ QFILE_TUPLE_POSITION * tuple_pos); extern int qfile_add_overflow_tuple_to_list (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id, PAGE_PTR ovfl_tpl_pg, QFILE_LIST_ID * input_list_id); -#if defined(ENABLE_UNUSED_FUNCTION) -extern int qfile_get_first_page (THREAD_ENTRY * thread_p, QFILE_LIST_ID * list_id); -#endif /* ENABLE_UNUSED_FUNCTION */ STATIC_INLINE void qfile_init_page_header (PAGE_PTR page_p) __attribute__ ((ALWAYS_INLINE)); /* Copy routines */ diff --git a/src/query/query_executor.c b/src/query/query_executor.c index b2200099d3a..3ba88639959 100644 --- a/src/query/query_executor.c +++ b/src/query/query_executor.c @@ -3030,7 +3030,7 @@ qexec_ordby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *arg) /* free currently fixed page */ if (info->fixed_page != NULL) { - qmgr_free_old_page_and_init (info->fixed_page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, info->fixed_page); } /* fix page and cache fixed vpid */ @@ -3100,7 +3100,7 @@ qexec_ordby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *arg) } } #if 1 /* SortCache */ - qmgr_free_old_page_and_init (thread_p, page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page); #endif } else @@ -3733,7 +3733,7 @@ qexec_clear_groupby_state (THREAD_ENTRY * thread_p, GROUPBY_STATE * gbstate) /* free currently fixed page */ if (gbstate->fixed_page != NULL) { - qmgr_free_old_page_and_init (gbstate->fixed_page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, gbstate->fixed_page); } #endif @@ -4087,7 +4087,7 @@ qexec_hash_gby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *a } if (status != NO_ERROR) { - qmgr_free_old_page_and_init (thread_p, page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page); return ER_FAILED; } @@ -4097,7 +4097,7 @@ qexec_hash_gby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *a { peek = PEEK; /* avoid unnecessary COPY */ } - qmgr_free_old_page_and_init (thread_p, page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page); } else { @@ -4247,7 +4247,7 @@ qexec_gby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *arg) /* free currently fixed page */ if (info->fixed_page != NULL) { - qmgr_free_old_page_and_init (info->fixed_page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, info->fixed_page); } /* fix page and cache fixed vpid */ @@ -4456,7 +4456,7 @@ qexec_gby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *arg) #if 1 /* SortCache */ if (page) { - qmgr_free_old_page_and_init (thread_p, page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page); } #endif @@ -4466,7 +4466,7 @@ qexec_gby_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *arg) #if 1 /* SortCache */ if (page) { - qmgr_free_old_page_and_init (thread_p, page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, page); } #endif @@ -4814,7 +4814,7 @@ qexec_groupby (THREAD_ENTRY * thread_p, XASL_NODE * xasl, XASL_STATE * xasl_stat QFILE_LIST_ID *list_idp; list_idp = &(gbstate.input_scan->list_id); - qmgr_free_old_page_and_init (gbstate.fixed_page, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, gbstate.fixed_page); } #endif qfile_destroy_list (thread_p, list_id); @@ -18531,7 +18531,7 @@ qexec_execute_connect_by (THREAD_ENTRY * thread_p, XASL_NODE * xasl, XASL_STATE { if (lfscan_id.curr_pgptr != NULL) { - qmgr_free_old_page_and_init (thread_p, lfscan_id.curr_pgptr, lfscan_id.list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, lfscan_id.curr_pgptr); } lfscan_id.list_id.tfile_vfid = NULL; @@ -18548,7 +18548,7 @@ qexec_execute_connect_by (THREAD_ENTRY * thread_p, XASL_NODE * xasl, XASL_STATE { if (lfscan_id.curr_pgptr != NULL) { - qmgr_free_old_page_and_init (thread_p, lfscan_id.curr_pgptr, lfscan_id.list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, lfscan_id.curr_pgptr); } lfscan_id.list_id.tfile_vfid = NULL; @@ -22294,8 +22294,7 @@ qexec_execute_analytic (THREAD_ENTRY * thread_p, XASL_NODE * xasl, XASL_STATE * /* clear current input: sort items and input scan */ if (analytic_state.curr_sort_page.page_p != NULL) { - qmgr_free_old_page_and_init (thread_p, analytic_state.curr_sort_page.page_p, - analytic_state.input_scan->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, analytic_state.curr_sort_page.page_p); analytic_state.curr_sort_page.vpid.pageid = NULL_PAGEID; analytic_state.curr_sort_page.vpid.volid = NULL_VOLID; } @@ -22672,7 +22671,7 @@ qexec_analytic_put_next (THREAD_ENTRY * thread_p, const RECDES * recdes, void *a { if (analytic_state->curr_sort_page.page_p != NULL) { - qmgr_free_old_page_and_init (thread_p, analytic_state->curr_sort_page.page_p, list_idp->tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, analytic_state->curr_sort_page.page_p); } analytic_state->curr_sort_page.page_p = qmgr_get_old_page (thread_p, &vpid, list_idp->tfile_vfid); @@ -23172,8 +23171,7 @@ qexec_clear_analytic_state (THREAD_ENTRY * thread_p, ANALYTIC_STATE * analytic_s if (analytic_state->curr_sort_page.page_p != NULL) { - qmgr_free_old_page_and_init (thread_p, analytic_state->curr_sort_page.page_p, - analytic_state->input_scan->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, analytic_state->curr_sort_page.page_p); analytic_state->curr_sort_page.vpid.pageid = NULL_PAGEID; analytic_state->curr_sort_page.vpid.volid = NULL_VOLID; } diff --git a/src/query/query_manager.c b/src/query/query_manager.c index 2855a7b1a27..daed1bef106 100644 --- a/src/query/query_manager.c +++ b/src/query/query_manager.c @@ -70,14 +70,6 @@ extern int method_Num_method_jsp_calls; /* We have two valid types of membuf used by temporary file. */ #define QMGR_IS_VALID_MEMBUF_TYPE(m) ((m) == TEMP_FILE_MEMBUF_NORMAL || (m) == TEMP_FILE_MEMBUF_KEY_BUFFER) -enum qmgr_page_type -{ - QMGR_UNKNOWN_PAGE, - QMGR_MEMBUF_PAGE, - QMGR_TEMP_FILE_PAGE -}; -typedef enum qmgr_page_type QMGR_PAGE_TYPE; - /* * ALLOCATION STRUCTURES * @@ -141,7 +133,6 @@ QMGR_QUERY_TABLE qmgr_Query_table = { NULL, 0, NULL, static struct drand48_data qmgr_rand_buf; #endif -static QMGR_PAGE_TYPE qmgr_get_page_type (PAGE_PTR page_p, QMGR_TEMP_FILE * temp_file_p); static bool qmgr_is_allowed_result_cache (QUERY_FLAG flag); static bool qmgr_can_get_from_cache (QUERY_FLAG flag); static bool qmgr_can_get_result_from_cache (QUERY_FLAG flag); @@ -182,38 +173,6 @@ static void qmgr_put_temp_file_into_list (QMGR_TEMP_FILE * temp_file_p); static int copy_bind_value_to_tdes (THREAD_ENTRY * thread_p, int num_bind_vals, DB_VALUE * bind_vals); -/* - * qmgr_get_page_type () - - * - * return: QMGR_PAGE_TYPE - * - * page_p(in): - * temp_file_p(in): - */ -static QMGR_PAGE_TYPE -qmgr_get_page_type (PAGE_PTR page_p, QMGR_TEMP_FILE * temp_file_p) -{ - PAGE_PTR begin_page = NULL, end_page = NULL; - - if (temp_file_p != NULL && temp_file_p->membuf_last >= 0 && temp_file_p->membuf && page_p >= temp_file_p->membuf[0] - && page_p <= temp_file_p->membuf[temp_file_p->membuf_last]) - { - return QMGR_MEMBUF_PAGE; - } - - begin_page = (PAGE_PTR) ((PAGE_PTR) temp_file_p->membuf - + DB_ALIGN (sizeof (PAGE_PTR) * temp_file_p->membuf_npages, MAX_ALIGNMENT)); - end_page = begin_page + temp_file_p->membuf_npages * DB_PAGESIZE; - if (begin_page <= page_p && page_p <= end_page) - { - /* defense code */ - assert (false); - return QMGR_UNKNOWN_PAGE; - } - - return QMGR_TEMP_FILE_PAGE; -} - bool qmgr_is_allowed_result_cache (QUERY_FLAG flag) { @@ -2467,77 +2426,52 @@ qmgr_get_old_page (THREAD_ENTRY * thread_p, VPID * vpid_p, QMGR_TEMP_FILE * tfil /* * qmgr_free_old_page () - * return: - * page_ptr(in) : - * tfile_vfidp(in) : + * page_ptr(in): */ void -qmgr_free_old_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p, QMGR_TEMP_FILE * tfile_vfid_p) +qmgr_free_old_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p) { - QMGR_PAGE_TYPE page_type; + FILEIO_PAGE *io_page_p; if (page_p == NULL) - { - assert (0); - return; - } - if (tfile_vfid_p == NULL) - { - pgbuf_unfix (thread_p, page_p); - return; - } - - page_type = qmgr_get_page_type (page_p, tfile_vfid_p); - if (page_type == QMGR_UNKNOWN_PAGE) { assert (false); return; } - if (page_type == QMGR_TEMP_FILE_PAGE) + CAST_PGPTR_TO_IOPGPTR (io_page_p, page_p); + + if (io_page_p->prv.ptype != PAGE_MEMORY) { - /* The list files came from list file cache have no tfile_vfid_p. */ pgbuf_unfix (thread_p, page_p); } -#if defined (SERVER_MODE) - else - { - assert (page_type == QMGR_MEMBUF_PAGE); - } -#endif } /* * qmgr_set_dirty_page () - * return: - * page_ptr(in) : - * free_page(in) : - * addrp(in) : - * tfile_vfidp(in) : + * page_ptr(in): + * free_page(in): */ void -qmgr_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p, int free_page, LOG_DATA_ADDR * addr_p, - QMGR_TEMP_FILE * tfile_vfid_p) +qmgr_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_p, int free_page) { - QMGR_PAGE_TYPE page_type; + FILEIO_PAGE *io_page_p; - page_type = qmgr_get_page_type (page_p, tfile_vfid_p); - if (page_type == QMGR_UNKNOWN_PAGE) + if (page_p == NULL) { assert (false); return; } - if (page_type == QMGR_TEMP_FILE_PAGE) + CAST_PGPTR_TO_IOPGPTR (io_page_p, page_p); + + if (io_page_p->prv.ptype != PAGE_MEMORY) { - log_skip_logging (thread_p, addr_p); + LOG_DATA_ADDR addr = { NULL, page_p, -1 }; + log_skip_logging (thread_p, &addr); pgbuf_set_dirty (thread_p, page_p, free_page); } -#if defined (SERVER_MODE) - else if (free_page == (int) FREE) - { - assert (page_type == QMGR_MEMBUF_PAGE); - } -#endif } /* @@ -2565,10 +2499,19 @@ qmgr_get_new_page (THREAD_ENTRY * thread_p, VPID * vpid_p, QMGR_TEMP_FILE * tfil /* first page, return memory buffer instead real temp file page */ if (tfile_vfid_p->membuf != NULL && tfile_vfid_p->membuf_last < tfile_vfid_p->membuf_npages - 1) { - vpid_p->volid = NULL_VOLID; - vpid_p->pageid = ++(tfile_vfid_p->membuf_last); + FILEIO_PAGE *io_page_p; + + tfile_vfid_p->membuf_last++; + page_p = tfile_vfid_p->membuf[tfile_vfid_p->membuf_last]; qfile_init_page_header (page_p); + + CAST_PGPTR_TO_IOPGPTR (io_page_p, page_p); + fileio_initialize_res (thread_p, io_page_p, IO_PAGESIZE); + io_page_p->prv.ptype = PAGE_MEMORY; + io_page_p->prv.volid = vpid_p->volid = NULL_VOLID; + io_page_p->prv.pageid = vpid_p->pageid = tfile_vfid_p->membuf_last; + return page_p; } @@ -2661,12 +2604,13 @@ qmgr_allocate_tempfile_with_buffer (int num_buffer_pages) { size_t size; QMGR_TEMP_FILE *tempfile_p; + FILEIO_PAGE *io_page_p; PAGE_PTR page_p; int i; size = DB_ALIGN (sizeof (QMGR_TEMP_FILE), MAX_ALIGNMENT); size += DB_ALIGN (sizeof (PAGE_PTR) * num_buffer_pages, MAX_ALIGNMENT); - size += DB_PAGESIZE * num_buffer_pages; + size += IO_PAGESIZE * num_buffer_pages; tempfile_p = (QMGR_TEMP_FILE *) malloc (size); if (tempfile_p == NULL) @@ -2675,15 +2619,16 @@ qmgr_allocate_tempfile_with_buffer (int num_buffer_pages) return NULL; } - memset (tempfile_p, 0x00, sizeof (QMGR_TEMP_FILE)); + memset (tempfile_p, 0, sizeof (QMGR_TEMP_FILE)); - tempfile_p->membuf = (PAGE_PTR *) ((PAGE_PTR) tempfile_p + DB_ALIGN (sizeof (QMGR_TEMP_FILE), MAX_ALIGNMENT)); - page_p = (PAGE_PTR) ((PAGE_PTR) tempfile_p->membuf + DB_ALIGN (sizeof (PAGE_PTR) * num_buffer_pages, MAX_ALIGNMENT)); + tempfile_p->membuf = (PAGE_PTR *) ((char *) tempfile_p + DB_ALIGN (sizeof (QMGR_TEMP_FILE), MAX_ALIGNMENT)); + io_page_p = + (FILEIO_PAGE *) ((char *) tempfile_p->membuf + DB_ALIGN (sizeof (PAGE_PTR) * num_buffer_pages, MAX_ALIGNMENT)); for (i = 0; i < num_buffer_pages; i++) { - tempfile_p->membuf[i] = page_p; - page_p += DB_PAGESIZE; + tempfile_p->membuf[i] = io_page_p->page; + io_page_p = (FILEIO_PAGE *) ((char *) io_page_p + IO_PAGESIZE); } /* initialize tempfile_p */ diff --git a/src/query/query_manager.h b/src/query/query_manager.h index 4a7bc324ca6..eafc4ec8775 100644 --- a/src/query/query_manager.h +++ b/src/query/query_manager.h @@ -39,10 +39,10 @@ // forward definitions struct xasl_cache_ent; -#define qmgr_free_old_page_and_init(thread_p, page_p, tfile_vfidp) \ +#define QMGR_FREE_OLD_PAGE_AND_INIT(thread_p, page_p) \ do \ { \ - qmgr_free_old_page ((thread_p), (page_p), (tfile_vfidp)); \ + qmgr_free_old_page ((thread_p), (page_p)); \ (page_p) = NULL; \ } \ while (0) @@ -152,9 +152,8 @@ extern int qmgr_get_query_error_with_entry (QMGR_QUERY_ENTRY * query_entryp); #endif /* ENABLE_UNUSED_FUNCTION */ extern void qmgr_add_modified_class (THREAD_ENTRY * thread_p, const OID * class_oid); extern PAGE_PTR qmgr_get_old_page (THREAD_ENTRY * thread_p, VPID * vpidp, QMGR_TEMP_FILE * tfile_vfidp); -extern void qmgr_free_old_page (THREAD_ENTRY * thread_p, PAGE_PTR page_ptr, QMGR_TEMP_FILE * tfile_vfidp); -extern void qmgr_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_ptr, int free_page, LOG_DATA_ADDR * addrp, - QMGR_TEMP_FILE * tfile_vfidp); +extern void qmgr_free_old_page (THREAD_ENTRY * thread_p, PAGE_PTR page_ptr); +extern void qmgr_set_dirty_page (THREAD_ENTRY * thread_p, PAGE_PTR page_ptr, int free_page); extern PAGE_PTR qmgr_get_new_page (THREAD_ENTRY * thread_p, VPID * vpidp, QMGR_TEMP_FILE * tfile_vfidp); extern QMGR_TEMP_FILE *qmgr_create_new_temp_file (THREAD_ENTRY * thread_p, QUERY_ID query_id, QMGR_TEMP_FILE_MEMBUF_TYPE membuf_type); diff --git a/src/query/scan_manager.c b/src/query/scan_manager.c index 9090c15d69d..29fb15803d5 100644 --- a/src/query/scan_manager.c +++ b/src/query/scan_manager.c @@ -8399,7 +8399,7 @@ scan_hash_probe_next (THREAD_ENTRY * thread_p, SCAN_ID * scan_id, QFILE_TUPLE * { if (llsidp->hlsid.hash_list_scan_type == HASH_METH_HYBRID) { - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); } scan_id_p->position = S_AFTER; return S_END; @@ -8438,7 +8438,7 @@ scan_hash_probe_next (THREAD_ENTRY * thread_p, SCAN_ID * scan_id, QFILE_TUPLE * *tuple = tplrec.tpl; return S_SUCCESS; case EH_KEY_NOTFOUND: - qmgr_free_old_page_and_init (thread_p, scan_id_p->curr_pgptr, scan_id_p->list_id.tfile_vfid); + QMGR_FREE_OLD_PAGE_AND_INIT (thread_p, scan_id_p->curr_pgptr); scan_id_p->position = S_AFTER; return S_END; case EH_ERROR_OCCURRED: diff --git a/src/storage/page_buffer.c b/src/storage/page_buffer.c index fea7e8f9bfb..b977c9d2d24 100644 --- a/src/storage/page_buffer.c +++ b/src/storage/page_buffer.c @@ -144,16 +144,6 @@ static int rv; assert ((bufptr) == (bufptr)->iopage_buffer->bcb); \ } while (0) -#define CAST_PGPTR_TO_IOPGPTR(io_pgptr, pgptr) \ - do { \ - (io_pgptr) = (FILEIO_PAGE *) ((char *) pgptr - offsetof (FILEIO_PAGE, page)); \ - } while (0) - -#define CAST_IOPGPTR_TO_PGPTR(pgptr, io_pgptr) \ - do { \ - (pgptr) = (PAGE_PTR) ((char *) (io_pgptr)->page); \ - } while (0) - #define CAST_BFPTR_TO_PGPTR(pgptr, bufptr) \ do { \ assert ((bufptr) == (bufptr)->iopage_buffer->bcb); \ diff --git a/src/storage/page_buffer.h b/src/storage/page_buffer.h index 4e23d4e6348..768001ff689 100644 --- a/src/storage/page_buffer.h +++ b/src/storage/page_buffer.h @@ -60,6 +60,16 @@ extern const VPID vpid_Null_vpid; #define PGBUF_PAGE_MODIFY_ARGS(pg, prev_lsa) \ PGBUF_PAGE_VPID_AS_ARGS (pg), LSA_AS_ARGS (prev_lsa), PGBUF_PAGE_LSA_AS_ARGS (pg) +/* macros for casting pointers */ +#define CAST_PGPTR_TO_IOPGPTR(io_pgptr, pgptr) \ + do { \ + (io_pgptr) = (FILEIO_PAGE *) ((char *) pgptr - offsetof (FILEIO_PAGE, page)); \ + } while (0) + +#define CAST_IOPGPTR_TO_PGPTR(pgptr, io_pgptr) \ + do { \ + (pgptr) = (PAGE_PTR) ((char *) (io_pgptr)->page); \ + } while (0) #define pgbuf_unfix_and_init_after_check(thread_p, pgptr) \ do { \ diff --git a/src/storage/storage_common.h b/src/storage/storage_common.h index f624dfbc1a9..ee34e9d0a9a 100644 --- a/src/storage/storage_common.h +++ b/src/storage/storage_common.h @@ -162,7 +162,8 @@ typedef enum PAGE_LOG, /* NONE - log page (unused) */ PAGE_DROPPED_FILES, /* Dropped files page. */ PAGE_VACUUM_DATA, /* Vacuum data. */ - PAGE_LAST = PAGE_VACUUM_DATA + PAGE_MEMORY, + PAGE_LAST = PAGE_MEMORY } PAGE_TYPE; /* Index scan OID buffer size as set by system parameter. */