forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit40d964e

Amit Kapila
Allow vacuum command to process indexes in parallel.
This feature allows the vacuum to leverage multiple CPUs in order toprocess indexes. This enables us to perform index vacuuming and indexcleanup with background workers. This adds a PARALLEL option to VACUUMcommand where the user can specify the number of workers that can be usedto perform the command which is limited by the number of indexes on atable. Specifying zero as a number of workers will disable parallelism.This option can't be used with the FULL option.Each index is processed by at most one vacuum process. Therefore parallelvacuum can be used when the table has at least two indexes.The parallel degree is either specified by the user or determined based onthe number of indexes that the table has, and further limited bymax_parallel_maintenance_workers. The index can participate in parallelvacuum iff it's size is greater than min_parallel_index_scan_size.Author: Masahiko Sawada and Amit KapilaReviewed-by: Dilip Kumar, Amit Kapila, Robert Haas, Tomas Vondra,Mahendra Singh and Sergei KornilovTested-by: Mahendra Singh and Prabhat SahuDiscussion:https://postgr.es/m/CAD21AoDTPMgzSkV4E3SFo1CH_x50bf5PqZFQf4jmqjk-C03BWg@mail.gmail.comhttps://postgr.es/m/CAA4eK1J-VoR9gzS5E75pcD-OH0mEyCdp8RihcwKrcuw7J-Q0+w@mail.gmail.com1 parent44f1fc8 commit40d964e
File tree
13 files changed
+1452
-136
lines changed- doc/src/sgml
- ref
- src
- backend
- access
- heap
- transam
- commands
- postmaster
- bin/psql
- include
- access
- commands
- test/regress
- expected
- sql
- tools/pgindent
13 files changed
+1452
-136
lines changedLines changed: 10 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2308 | 2308 |
| |
2309 | 2309 |
| |
2310 | 2310 |
| |
2311 |
| - | |
2312 |
| - | |
2313 |
| - | |
2314 |
| - | |
2315 |
| - | |
2316 |
| - | |
2317 |
| - | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
2318 | 2318 |
| |
2319 | 2319 |
| |
2320 | 2320 |
| |
| |||
4915 | 4915 |
| |
4916 | 4916 |
| |
4917 | 4917 |
| |
4918 |
| - | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
4919 | 4921 |
| |
4920 | 4922 |
| |
4921 | 4923 |
| |
|
Lines changed: 55 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
37 | 38 |
| |
38 | 39 |
| |
39 | 40 |
| |
| |||
75 | 76 |
| |
76 | 77 |
| |
77 | 78 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 |
| |
83 | 88 |
| |
84 | 89 |
| |
| |||
223 | 228 |
| |
224 | 229 |
| |
225 | 230 |
| |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
226 | 258 |
| |
227 | 259 |
| |
228 | 260 |
| |
| |||
237 | 269 |
| |
238 | 270 |
| |
239 | 271 |
| |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
240 | 281 |
| |
241 | 282 |
| |
242 | 283 |
| |
| |||
316 | 357 |
| |
317 | 358 |
| |
318 | 359 |
| |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
319 | 366 |
| |
320 | 367 |
| |
321 | 368 |
| |
322 |
| - | |
323 |
| - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
324 | 373 |
| |
325 | 374 |
| |
326 | 375 |
| |
|
0 commit comments
Comments
(0)