|
| 1 | +show autovacuum; |
| 2 | + autovacuum |
| 3 | +------------ |
| 4 | + off |
| 5 | +(1 row) |
| 6 | + |
| 7 | +-- async collect stats in vacuum |
| 8 | +set pax.enable_sync_collect_stats to off; |
| 9 | +create table pax_vacuum (a int, b int) using pax with(minmax_columns='a,b') distributed by (a); |
| 10 | +insert into pax_vacuum select i, i from generate_series(1, 1000) i; |
| 11 | +select * from get_pax_aux_table('pax_vacuum'); |
| 12 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 13 | +-------------+------------+-----------------------------------------------------------------+----------------+-----------------+--------------- |
| 14 | + 0 | 322 | [(false,false),(322),None,None],[(false,false),(322),None,None] | f | f | f |
| 15 | + 0 | 340 | [(false,false),(340),None,None],[(false,false),(340),None,None] | f | f | f |
| 16 | + 0 | 338 | [(false,false),(338),None,None],[(false,false),(338),None,None] | f | f | f |
| 17 | +(3 rows) |
| 18 | + |
| 19 | +vacuum pax_vacuum; |
| 20 | +select * from get_pax_aux_table('pax_vacuum'); |
| 21 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 22 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 23 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 24 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 25 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 26 | +(3 rows) |
| 27 | + |
| 28 | +truncate pax_vacuum; |
| 29 | +select * from get_pax_aux_table('pax_vacuum'); |
| 30 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 31 | +-------------+------------+--------------+----------------+-----------------+--------------- |
| 32 | +(0 rows) |
| 33 | + |
| 34 | +-- sync collect stats in vacuum |
| 35 | +set pax.enable_sync_collect_stats to on; |
| 36 | +insert into pax_vacuum select i, i from generate_series(1, 1000) i; |
| 37 | +select * from get_pax_aux_table('pax_vacuum'); |
| 38 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 39 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 40 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 41 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 42 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 43 | +(3 rows) |
| 44 | + |
| 45 | +vacuum pax_vacuum; |
| 46 | +select * from get_pax_aux_table('pax_vacuum'); |
| 47 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 48 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 49 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 50 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 51 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 52 | +(3 rows) |
| 53 | + |
| 54 | +truncate pax_vacuum; |
| 55 | +select * from get_pax_aux_table('pax_vacuum'); |
| 56 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 57 | +-------------+------------+--------------+----------------+-----------------+--------------- |
| 58 | +(0 rows) |
| 59 | + |
| 60 | +-- update and vacuum |
| 61 | +set pax.enable_sync_collect_stats to off; |
| 62 | +insert into pax_vacuum select i, i from generate_series(1, 1000) i; |
| 63 | +select * from get_pax_aux_table('pax_vacuum'); |
| 64 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 65 | +-------------+------------+-----------------------------------------------------------------+----------------+-----------------+--------------- |
| 66 | + 0 | 322 | [(false,false),(322),None,None],[(false,false),(322),None,None] | f | f | f |
| 67 | + 0 | 338 | [(false,false),(338),None,None],[(false,false),(338),None,None] | f | f | f |
| 68 | + 0 | 340 | [(false,false),(340),None,None],[(false,false),(340),None,None] | f | f | f |
| 69 | +(3 rows) |
| 70 | + |
| 71 | +vacuum pax_vacuum; |
| 72 | +select * from get_pax_aux_table('pax_vacuum'); |
| 73 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 74 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 75 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 76 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 77 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 78 | +(3 rows) |
| 79 | + |
| 80 | +update pax_vacuum set b = b + 1; |
| 81 | +select * from get_pax_aux_table('pax_vacuum'); |
| 82 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 83 | +-------------+------------+-----------------------------------------------------------------+----------------+-----------------+--------------- |
| 84 | + 0 | 338 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 85 | + 1 | 338 | [(false,false),(338),None,None],[(false,false),(338),None,None] | f | f | f |
| 86 | + 0 | 322 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 87 | + 1 | 322 | [(false,false),(322),None,None],[(false,false),(322),None,None] | f | f | f |
| 88 | + 0 | 340 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 89 | + 1 | 340 | [(false,false),(340),None,None],[(false,false),(340),None,None] | f | f | f |
| 90 | +(6 rows) |
| 91 | + |
| 92 | +vacuum pax_vacuum; |
| 93 | +select * from get_pax_aux_table('pax_vacuum'); |
| 94 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 95 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 96 | + 0 | 338 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 97 | + 1 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(3,1001),(167000)] | f | f | f |
| 98 | + 0 | 322 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 99 | + 1 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(2,999),(161602)] | f | f | f |
| 100 | + 0 | 340 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 101 | + 1 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(6,998),(172898)] | f | f | f |
| 102 | +(6 rows) |
| 103 | + |
| 104 | +truncate pax_vacuum; |
| 105 | +select * from get_pax_aux_table('pax_vacuum'); |
| 106 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 107 | +-------------+------------+--------------+----------------+-----------------+--------------- |
| 108 | +(0 rows) |
| 109 | + |
| 110 | +-- sync collect stats with vacuum |
| 111 | +set pax.enable_sync_collect_stats to on; |
| 112 | +insert into pax_vacuum select i, i from generate_series(1, 1000) i; |
| 113 | +select * from get_pax_aux_table('pax_vacuum'); |
| 114 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 115 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 116 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 117 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 118 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 119 | +(3 rows) |
| 120 | + |
| 121 | +vacuum pax_vacuum; |
| 122 | +select * from get_pax_aux_table('pax_vacuum'); |
| 123 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 124 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 125 | + 0 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(5,997),(172558)] | f | f | f |
| 126 | + 0 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(2,1000),(166662)] | f | f | f |
| 127 | + 0 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(1,998),(161280)] | f | f | f |
| 128 | +(3 rows) |
| 129 | + |
| 130 | +update pax_vacuum set b = b + 1; |
| 131 | +select * from get_pax_aux_table('pax_vacuum'); |
| 132 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 133 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 134 | + 0 | 338 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 135 | + 1 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(3,1001),(167000)] | f | f | f |
| 136 | + 0 | 322 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 137 | + 1 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(2,999),(161602)] | f | f | f |
| 138 | + 0 | 340 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 139 | + 1 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(6,998),(172898)] | f | f | f |
| 140 | +(6 rows) |
| 141 | + |
| 142 | +vacuum pax_vacuum; |
| 143 | +select * from get_pax_aux_table('pax_vacuum'); |
| 144 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 145 | +-------------+------------+---------------------------------------------------------------------------------+----------------+-----------------+--------------- |
| 146 | + 0 | 338 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 147 | + 1 | 338 | [(false,false),(338),(2,1000),(166662)],[(false,false),(338),(3,1001),(167000)] | f | f | f |
| 148 | + 0 | 322 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 149 | + 1 | 322 | [(false,false),(322),(1,998),(161280)],[(false,false),(322),(2,999),(161602)] | f | f | f |
| 150 | + 0 | 340 | [(true,false),(0),None,None],[(true,false),(0),None,None] | t | f | f |
| 151 | + 1 | 340 | [(false,false),(340),(5,997),(172558)],[(false,false),(340),(6,998),(172898)] | f | f | f |
| 152 | +(6 rows) |
| 153 | + |
| 154 | +truncate pax_vacuum; |
| 155 | +select * from get_pax_aux_table('pax_vacuum'); |
| 156 | + ptblockname | pttupcount | ptstatistics | ptexistvisimap | ptexistexttoast | ptisclustered |
| 157 | +-------------+------------+--------------+----------------+-----------------+--------------- |
| 158 | +(0 rows) |
| 159 | + |
| 160 | +drop table pax_vacuum; |
0 commit comments