* Copy data from `OldTable` into `NewTable`, as part of a CLUSTER or VACUUM * FULL. * * Additional Input parameters: * - use_sort - if true, the table contents are sorted appropriate for * `OldIndex`; if false and OldIndex is not InvalidOid, the data is copied * in that index's order; if false and OldIndex is InvalidOid, no sorting is * performed * - OldIndex - see use_sort * - Olde
| 1888 | * - *tups_recently_dead - stats, for logging, if appropriate for AM |
| 1889 | */ |
| 1890 | static inline void |
| 1891 | table_relation_copy_for_cluster(Relation OldTable, Relation NewTable, |
| 1892 | Relation OldIndex, |
| 1893 | bool use_sort, |
| 1894 | TransactionId OldestXmin, |
| 1895 | TransactionId *xid_cutoff, |
| 1896 | MultiXactId *multi_cutoff, |
| 1897 | double *num_tuples, |
| 1898 | double *tups_vacuumed, |
| 1899 | double *tups_recently_dead) |
| 1900 | { |
| 1901 | OldTable->rd_tableam->relation_copy_for_cluster(OldTable, NewTable, OldIndex, |
| 1902 | use_sort, OldestXmin, |
| 1903 | xid_cutoff, multi_cutoff, |
| 1904 | num_tuples, tups_vacuumed, |
| 1905 | tups_recently_dead); |
| 1906 | } |
| 1907 | |
| 1908 | /* |
| 1909 | * Perform VACUUM on the relation. The VACUUM can be triggered by a user or by |