add option to truncate posts table when fetching data