Commit 8292c74
authored
Have the reindexer reindex more
Here, expand the scope of the reindexer so that beyond the pair of
indexes it reindexes right now, it also reindexes all the other ones in
the `river_job` table. This won't make a huge different for many uses of
River, but it'll make a particular difference in cases where for some
amount of time `river_job` became very large, but has since contracted
to a much more modest size. B-trees expand but never shrink, so in that
case the indexes will be left very large despite holding very little,
and the only way to get them back down to size is to rebuild them.
More reindexes will always put more load on the database, but we're
still doing that as carefully as we can in that indexes are rebuilt one
by one, and using `CONCURRENTLY`. Back in #935 we added protection so
that in case of a situation where index builds are too expensive and
start to fail, the reindexer will bail out instead of trying and failing
over and over again.river_job indexes (#963)1 parent 9466aa0 commit 8292c74
File tree
4 files changed
+29
-3
lines changed- internal/maintenance
4 files changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6428 | 6428 | | |
6429 | 6429 | | |
6430 | 6430 | | |
6431 | | - | |
| 6431 | + | |
| 6432 | + | |
| 6433 | + | |
| 6434 | + | |
| 6435 | + | |
| 6436 | + | |
| 6437 | + | |
6432 | 6438 | | |
6433 | 6439 | | |
6434 | 6440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
166 | 177 | | |
167 | 178 | | |
168 | 179 | | |
| |||
0 commit comments