Dear Sawada-san, Thanks for updating the patch. ISTM that 0001 and 0002 can be applied independently. Therefore I can firstly post some comments only for them.
Comments for 0001: ``` + /* New estimated total # of tuples and total # of live tuples */ ``` There is a unnecessary blank. ``` + scan_state = palloc(sizeof(LVRelScanState)); + scan_state->scanned_pages = 0; + scan_state->removed_pages = 0; + scan_state->new_frozen_tuple_pages = 0; + scan_state->lpdead_item_pages = 0; + scan_state->missed_dead_pages = 0; + scan_state->nonempty_pages = 0; + scan_state->tuples_deleted = 0; + scan_state->tuples_frozen = 0; + scan_state->lpdead_items = 0; + scan_state->live_tuples = 0; + scan_state->recently_dead_tuples = 0; + scan_state->missed_dead_tuples = 0; + scan_state->vm_new_visible_pages = 0; + scan_state->vm_new_visible_frozen_pages = 0; + scan_state->vm_new_frozen_pages = 0; + vacrel->scan_state = scan_state; ``` Since most of attributes are initialized as zero, can you use palloc0() instead? ``` - * the relation are read. vacrel->skippedallvis is set if we skip a block - * that's all-visible but not all-frozen, to ensure that we don't update + * the relation are read. vacrel->scan_state->skippedallvis is set if we skip + * a block that's all-visible but not all-frozen, to ensure that we don't update * relfrozenxid in that case. vacrel also holds information about the next ``` A line exceeds 80-char limit. ``` + /* How many time index vacuuming or cleaning up is executed? */ + int num_index_scans; + ``` Comments for 0002: ``` + /* How many time index vacuuming or cleaning up is executed? */ + int num_index_scans; + ``` I feel this is bit confusing because LVRelState also has "num_index_scans". How about "num_parallel_index_scans"? Attached patch contains above changes. Best regards, Hayato Kuroda FUJITSU LIMITED
kuroda.diffs
Description: kuroda.diffs