mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Introduce a maintenance_io_concurrency setting.
Introduce a GUC and a tablespace option to control I/O prefetching, much
like effective_io_concurrency, but for work that is done on behalf of
many client sessions.
Use the new setting in heapam.c instead of the hard-coded formula
effective_io_concurrency + 10 introduced by commit 558a9165e0
. Go with
a default value of 10 for now, because it's a round number pretty close
to the value used for that existing case.
Discussion: https://postgr.es/m/CA%2BhUKGJUw08dPs_3EUcdO6M90GnjofPYrWp4YSLaBkgYwS-AqA%40mail.gmail.com
This commit is contained in:
14
src/backend/utils/cache/spccache.c
vendored
14
src/backend/utils/cache/spccache.c
vendored
@ -221,3 +221,17 @@ get_tablespace_io_concurrency(Oid spcid)
|
||||
else
|
||||
return spc->opts->effective_io_concurrency;
|
||||
}
|
||||
|
||||
/*
|
||||
* get_tablespace_maintenance_io_concurrency
|
||||
*/
|
||||
int
|
||||
get_tablespace_maintenance_io_concurrency(Oid spcid)
|
||||
{
|
||||
TableSpaceCacheEntry *spc = get_tablespace(spcid);
|
||||
|
||||
if (!spc->opts || spc->opts->maintenance_io_concurrency < 0)
|
||||
return maintenance_io_concurrency;
|
||||
else
|
||||
return spc->opts->maintenance_io_concurrency;
|
||||
}
|
||||
|
Reference in New Issue
Block a user