1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Reduce lock levels for table storage params related to planning

The following parameters are now updateable with ShareUpdateExclusiveLock
effective_io_concurrency
parallel_workers
seq_page_cost
random_page_cost
n_distinct
n_distinct_inherited

Simon Riggs and Fabrízio Mello
This commit is contained in:
Simon Riggs
2017-03-06 16:04:31 +05:30
parent 8b4d582d27
commit 21d4e2e206
2 changed files with 54 additions and 7 deletions

View File

@ -173,6 +173,10 @@ get_tablespace(Oid spcid)
/*
* get_tablespace_page_costs
* Return random and/or sequential page costs for a given tablespace.
*
* This value is not locked by the transaction, so this value may
* be changed while a SELECT that has used these values for planning
* is still executing.
*/
void
get_tablespace_page_costs(Oid spcid,
@ -200,6 +204,13 @@ get_tablespace_page_costs(Oid spcid,
}
}
/*
* get_tablespace_io_concurrency
*
* This value is not locked by the transaction, so this value may
* be changed while a SELECT that has used these values for planning
* is still executing.
*/
int
get_tablespace_io_concurrency(Oid spcid)
{