summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Frost2021-08-27 23:23:14 +0000
committerStephen Frost2021-08-27 23:23:14 +0000
commitce42efaa2696fa74dffcbaa7d25c4ef00e93e1c0 (patch)
tree6ff849cd634eee6b30615637c8a053ebac8d43c6 /src
parentf01727290fe0c7fdf7bb5a0c2526a15db8c2c52f (diff)
Use maintenance_io_concurrency for ANALYZE prefetch
When prefetching pages for ANALYZE, we should be using maintenance_io_concurrenty (by calling get_tablespace_maintenance_io_concurrency(), not get_tablespace_io_concurrency()). ANALYZE prefetching was introduced in c6fc50c, so back-patch to 14. Backpatch-through: 14 Reported-By: Egor Rogov Discussion: https://postgr.es/m/9beada99-34ce-8c95-fadb-451768d08c64%40postgrespro.ru
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/analyze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index b31426e2b21..03cdf4f5e8e 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -1164,7 +1164,7 @@ acquire_sample_rows(Relation onerel, int elevel,
nblocks = BlockSampler_Init(&bs, totalblocks, targrows, randseed);
#ifdef USE_PREFETCH
- prefetch_maximum = get_tablespace_io_concurrency(onerel->rd_rel->reltablespace);
+ prefetch_maximum = get_tablespace_maintenance_io_concurrency(onerel->rd_rel->reltablespace);
/* Create another BlockSampler, using the same seed, for prefetching */
if (prefetch_maximum)
(void) BlockSampler_Init(&prefetch_bs, totalblocks, targrows, randseed);