mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +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:
@ -349,6 +349,19 @@ static relopt_int intRelOpts[] =
|
||||
-1, 0, MAX_IO_CONCURRENCY
|
||||
#else
|
||||
0, 0, 0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
{
|
||||
"maintenance_io_concurrency",
|
||||
"Number of simultaneous requests that can be handled efficiently by the disk subsystem for maintenance work.",
|
||||
RELOPT_KIND_TABLESPACE,
|
||||
ShareUpdateExclusiveLock
|
||||
},
|
||||
#ifdef USE_PREFETCH
|
||||
-1, 0, MAX_IO_CONCURRENCY
|
||||
#else
|
||||
0, 0, 0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
@ -1700,7 +1713,8 @@ tablespace_reloptions(Datum reloptions, bool validate)
|
||||
static const relopt_parse_elt tab[] = {
|
||||
{"random_page_cost", RELOPT_TYPE_REAL, offsetof(TableSpaceOpts, random_page_cost)},
|
||||
{"seq_page_cost", RELOPT_TYPE_REAL, offsetof(TableSpaceOpts, seq_page_cost)},
|
||||
{"effective_io_concurrency", RELOPT_TYPE_INT, offsetof(TableSpaceOpts, effective_io_concurrency)}
|
||||
{"effective_io_concurrency", RELOPT_TYPE_INT, offsetof(TableSpaceOpts, effective_io_concurrency)},
|
||||
{"maintenance_io_concurrency", RELOPT_TYPE_INT, offsetof(TableSpaceOpts, maintenance_io_concurrency)}
|
||||
};
|
||||
|
||||
return (bytea *) build_reloptions(reloptions, validate,
|
||||
|
Reference in New Issue
Block a user