mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Add maintenance_io_concurrency flag to some read stream users
Index vacuuming and [auto]prewarm AIO concurrency should be governed by maintenance_io_concurrency. As such, pass those read stream users the READ_STREAM_MAINTENANCE flag which will calculate their read stream distance with maintenance_io_concurrency instead of effective_io_concurrency. This was an oversight in the original commits making those operations use the read stream API. Discussion: https://postgr.es/m/flat/CAAKRu_aopDxTo4b41Mt_7Zc-z0_ngocrY8SFCCY6Aph1HgwuNw%40mail.gmail.com
This commit is contained in:
parent
ce72e7e02e
commit
f132815fd7
@ -621,7 +621,8 @@ autoprewarm_database_main(Datum main_arg)
|
|||||||
.nblocks = nblocks,
|
.nblocks = nblocks,
|
||||||
};
|
};
|
||||||
|
|
||||||
stream = read_stream_begin_relation(READ_STREAM_DEFAULT |
|
stream = read_stream_begin_relation(READ_STREAM_MAINTENANCE |
|
||||||
|
READ_STREAM_DEFAULT |
|
||||||
READ_STREAM_USE_BATCHING,
|
READ_STREAM_USE_BATCHING,
|
||||||
NULL,
|
NULL,
|
||||||
rel,
|
rel,
|
||||||
|
@ -202,7 +202,8 @@ pg_prewarm(PG_FUNCTION_ARGS)
|
|||||||
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
||||||
* locks.
|
* locks.
|
||||||
*/
|
*/
|
||||||
stream = read_stream_begin_relation(READ_STREAM_FULL |
|
stream = read_stream_begin_relation(READ_STREAM_MAINTENANCE |
|
||||||
|
READ_STREAM_FULL |
|
||||||
READ_STREAM_USE_BATCHING,
|
READ_STREAM_USE_BATCHING,
|
||||||
NULL,
|
NULL,
|
||||||
rel,
|
rel,
|
||||||
|
@ -215,7 +215,8 @@ gistvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
|||||||
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
||||||
* locks.
|
* locks.
|
||||||
*/
|
*/
|
||||||
stream = read_stream_begin_relation(READ_STREAM_FULL |
|
stream = read_stream_begin_relation(READ_STREAM_MAINTENANCE |
|
||||||
|
READ_STREAM_FULL |
|
||||||
READ_STREAM_USE_BATCHING,
|
READ_STREAM_USE_BATCHING,
|
||||||
info->strategy,
|
info->strategy,
|
||||||
rel,
|
rel,
|
||||||
|
@ -1232,7 +1232,8 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
|||||||
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
||||||
* locks.
|
* locks.
|
||||||
*/
|
*/
|
||||||
stream = read_stream_begin_relation(READ_STREAM_FULL |
|
stream = read_stream_begin_relation(READ_STREAM_MAINTENANCE |
|
||||||
|
READ_STREAM_FULL |
|
||||||
READ_STREAM_USE_BATCHING,
|
READ_STREAM_USE_BATCHING,
|
||||||
info->strategy,
|
info->strategy,
|
||||||
rel,
|
rel,
|
||||||
|
@ -827,7 +827,8 @@ spgvacuumscan(spgBulkDeleteState *bds)
|
|||||||
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
* It is safe to use batchmode as block_range_read_stream_cb takes no
|
||||||
* locks.
|
* locks.
|
||||||
*/
|
*/
|
||||||
stream = read_stream_begin_relation(READ_STREAM_FULL |
|
stream = read_stream_begin_relation(READ_STREAM_MAINTENANCE |
|
||||||
|
READ_STREAM_FULL |
|
||||||
READ_STREAM_USE_BATCHING,
|
READ_STREAM_USE_BATCHING,
|
||||||
bds->info->strategy,
|
bds->info->strategy,
|
||||||
index,
|
index,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user