aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2017-03-06 16:04:31 +0530
committerSimon Riggs <simon@2ndQuadrant.com>2017-03-06 16:04:31 +0530
commit21d4e2e20656381b4652eb675af4f6d65053607f (patch)
tree5966f82b9cddeaacd8214ec824f90de13689a821 /src/backend/utils/cache
parent8b4d582d279d784616c228be58af1e39aa430402 (diff)
downloadpostgresql-21d4e2e20656381b4652eb675af4f6d65053607f.tar.gz
postgresql-21d4e2e20656381b4652eb675af4f6d65053607f.zip
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
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/spccache.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/utils/cache/spccache.c b/src/backend/utils/cache/spccache.c
index 9dcb80cde0d..eafc00f9ea0 100644
--- a/src/backend/utils/cache/spccache.c
+++ b/src/backend/utils/cache/spccache.c
@@ -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)
{