summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-01-05 21:54:00 +0000
committerRobert Haas <rhaas@postgresql.org>2010-01-05 21:54:00 +0000
commitd86d51a95810caebcea587498068ff32fe28293e (patch)
tree031fb02a2ef325762250b163acd215cd7c31c2bb /src/include/utils
parent72559b49c051ff7dc860068c96324ddf07d7955d (diff)
downloadpostgresql-d86d51a95810caebcea587498068ff32fe28293e.tar.gz
Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
This patch only supports seq_page_cost and random_page_cost as parameters, but it provides the infrastructure to scalably support many more. In particular, we may want to add support for effective_io_concurrency, but I'm leaving that as future work for now. Thanks to Tom Lane for design help and Alvaro Herrera for the review.
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/spccache.h19
-rw-r--r--src/include/utils/syscache.h3
2 files changed, 21 insertions, 1 deletions
diff --git a/src/include/utils/spccache.h b/src/include/utils/spccache.h
new file mode 100644
index 0000000000..73b9f7370d
--- /dev/null
+++ b/src/include/utils/spccache.h
@@ -0,0 +1,19 @@
+/*-------------------------------------------------------------------------
+ *
+ * spccache.h
+ * Tablespace cache.
+ *
+ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/utils/spccache.h,v 1.1 2010/01/05 21:54:00 rhaas Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef SPCCACHE_H
+#define SPCCACHE_H
+
+void get_tablespace_page_costs(Oid spcid, float8 *spc_random_page_cost,
+ float8 *spc_seq_page_cost);
+
+#endif /* SPCCACHE_H */
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index 6b12c84da2..8cdd7e79ee 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.77 2010/01/02 16:58:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.78 2010/01/05 21:54:00 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,6 +71,7 @@ enum SysCacheIdentifier
RELOID,
RULERELNAME,
STATRELATTINH,
+ TABLESPACEOID,
TSCONFIGMAP,
TSCONFIGNAMENSP,
TSCONFIGOID,